Consonant Duplicator
Duplicate consonants in any text instantly. Control repetition count, target specific consonants, and copy transformed text with one click.
About
Consonant duplication is a character-level string transformation where each consonant in the input is repeated n times while vowels, digits, punctuation, and whitespace pass through unchanged. The operation matters more than it appears. In computational linguistics, controlled letter repetition tests tokenizer robustness and edge-case handling in NLP pipelines. In creative writing and social media, duplicating consonants produces stylistic emphasis (e.g., "helllo" β expressive tone) or comedic effect. Misapplying the transformation - accidentally duplicating vowels or ignoring case - corrupts the output. This tool operates on the standard English consonant set of 21 letters: B, C, D, F, G, H, J, K, L, M, N, P, Q, R, S, T, V, W, X, Y, Z. The letter Y is classified as a consonant here, consistent with its phonological behavior at syllable onsets.
You control the duplication factor n (from 2 to 10 repeats per consonant) and can optionally restrict the transformation to a specific subset of consonants. The tool preserves original casing: an uppercase "B" duplicates as "BB", not "Bb". Processing is instantaneous for inputs up to 10,000 characters. Note: this tool assumes English-alphabet consonants only. Characters outside ASCII A - Z (accented letters, Cyrillic, CJK) pass through unmodified.
Formulas
The transformation applies a simple character mapping function. For each character c in the input string S, the output character sequence O(c) is defined as:
Where c Γ n denotes the character c repeated n times (string repetition, not multiplication). The consonant set C is defined as:
The total output length L is computed as:
Where |S| is the length of the input string. The expansion ratio R for a string with consonant density d (fraction of characters that are consonants) is:
Where n = duplication count, d = consonant density (typically 0.40 - 0.62 for English text), L = output length, |S| = input length, R = expansion ratio, C = the set of 21 English consonants.
Reference Data
| Letter | Classification | IPA Example | Input "cat" | Output (n=2) | Output (n=3) |
|---|---|---|---|---|---|
| A | Vowel | /Γ¦/ | a | a | a |
| B | Consonant | /b/ | b | bb | bbb |
| C | Consonant | /k/, /s/ | c | cc | ccc |
| D | Consonant | /d/ | d | dd | ddd |
| E | Vowel | /iΛ/, /Ι/ | e | e | e |
| F | Consonant | /f/ | f | ff | fff |
| G | Consonant | /Ι‘/, /dΚ/ | g | gg | ggg |
| H | Consonant | /h/ | h | hh | hhh |
| I | Vowel | /aΙͺ/, /Ιͺ/ | i | i | i |
| J | Consonant | /dΚ/ | j | jj | jjj |
| K | Consonant | /k/ | k | kk | kkk |
| L | Consonant | /l/ | l | ll | lll |
| M | Consonant | /m/ | m | mm | mmm |
| N | Consonant | /n/ | n | nn | nnn |
| O | Vowel | /oΚ/, /Ι/ | o | o | o |
| P | Consonant | /p/ | p | pp | ppp |
| Q | Consonant | /kw/ | q | qqq | |
| R | Consonant | /ΙΉ/ | r | rr | rrr |
| S | Consonant | /s/, /z/ | s | ss | sss |
| T | Consonant | /t/ | t | tt | ttt |
| U | Vowel | /juΛ/, /Κ/ | u | u | u |
| V | Consonant | /v/ | v | vv | vvv |
| W | Consonant | /w/ | w | ww | www |
| X | Consonant | /ks/ | x | xx | xxx |
| Y | Consonant | /j/ | y | yy | yyy |
| Z | Consonant | /z/ | z | zz | zzz |