Overview
Introduction
Doubling every consonant in a passage, for a stuttering or heavily emphasized speech effect, is fiddly to apply consistently across a whole passage by hand.
It runs entirely client-side, so nothing you paste is ever uploaded to a server.
What Is Consonant Duplicator?
A consonant duplicator that inserts a copy of each consonant letter, any letter that isn't a, e, i, o, or u, immediately after itself.
It runs entirely client-side as part of this site's String Tools collection, so nothing you paste is ever uploaded to a server.
How Consonant Duplicator Works
The tool checks every letter in the input, and any letter that doesn't match the vowel set has a copy of itself inserted right after it, while vowels and non-letter characters pass through untouched.
The transformation happens synchronously in JavaScript the moment you type, with no network round trip involved.
When To Use Consonant Duplicator
Use it to create a stuttering, emphasized, or stylized speech effect in dialogue, or to stress-test a UI with doubled consonant characters.
It's a fast way to get the answer without opening a code editor, a REPL, or writing a one-off script just to check.
Often used alongside Consonant Replacer and Consonant Remover.
Features
Advantages
- Preserves the case of every duplicated consonant automatically.
- Leaves vowels and punctuation completely untouched.
- Only letters are matched, so digits, punctuation, and whitespace pass through untouched and the text keeps its original structure.
Limitations
- Treats 'y' as a consonant in every case, since it isn't part of the five-vowel set used by this tool.
- Matches the English alphabet only, so accented and non-Latin letters are not doubled and pass through unchanged.
Examples
Best Practices & Notes
Best Practices
- Use it sparingly on short words or phrases for the clearest stylistic effect.
- Keep the input short, since the output grows by roughly one character per consonant and long passages quickly become unreadable.
- Check the result where you intend to use it, because doubled consonants confuse spell-checkers and are read out literally by screen readers.
Developer Notes
The transform is `input.replace(/[a-zA-Z]/g, (char) => (/[aeiouAEIOU]/.test(char) ? char : char + char))`, so the callback checks each matched letter against the vowel set and only doubles it when it's a consonant, returning vowels unchanged.
Consonant Duplicator Use Cases
- Creating stuttering or emphasized dialogue effects
- Building stylized display text for a creative project
- Stress-testing a font or layout with doubled consonant characters
Common Mistakes
- Expecting 'y' to be treated as a vowel and skipped; it's classified as a consonant here.
- Applying it to long passages, which can make the doubled text hard to read.
Tips
- Pair with the Vowel Duplicator if you want every letter in the text doubled instead of just consonants.
- Since only a-z and A-Z are matched, mixing in accented characters keeps parts of a phrase readable while the rest stutters.