User Rating 0.0 β˜…β˜…β˜…β˜…β˜…
Total Usage 0 times
0 / 10,000
Consonant Filter
Is this tool helpful?

Your feedback helps us improve.

β˜… β˜… β˜… β˜… β˜…

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.

consonant duplicator text transformer letter repeater consonant repeater text formatting tool string manipulation

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:

O(c) = {
c Γ— n if c ∈ Cc   otherwise

Where c Γ— n denotes the character c repeated n times (string repetition, not multiplication). The consonant set C is defined as:

C = {B, C, D, F, G, H, J, K, L, M, N, P, Q, R, S, T, V, W, X, Y, Z}

The total output length L is computed as:

L = |S|βˆ‘i=1 O(Si)

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:

R = L|S| = d β‹… n + (1 βˆ’ d)

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

LetterClassificationIPA ExampleInput "cat"Output (n=2)Output (n=3)
AVowel/Γ¦/aaa
BConsonant/b/bbbbbb
CConsonant/k/, /s/cccccc
DConsonant/d/dddddd
EVowel/iː/, /Ι›/eee
FConsonant/f/ffffff
GConsonant/Ι‘/, /dΚ’/gggggg
HConsonant/h/hhhhhh
IVowel/aΙͺ/, /Ιͺ/iii
JConsonant/dΚ’/jjjjjj
KConsonant/k/kkkkkk
LConsonant/l/llllll
MConsonant/m/mmmmmm
NConsonant/n/nnnnnn
OVowel/oʊ/, /Ι’/ooo
PConsonant/p/pppppp
QConsonant/kw/qqqqqq
RConsonant/ΙΉ/rrrrrr
SConsonant/s/, /z/ssssss
TConsonant/t/tttttt
UVowel/juː/, /ʌ/uuu
VConsonant/v/vvvvvv
WConsonant/w/wwwwww
XConsonant/ks/xxxxxx
YConsonant/j/yyyyyy
ZConsonant/z/zzzzzz

Frequently Asked Questions

In English phonology, Y functions as a consonant when it appears at the onset of a syllable (e.g., "yes", "yellow") and as a vowel in other positions (e.g., "gym", "happy"). This tool follows the traditional alphabetic classification where Y is listed among the 21 consonants. This is consistent with most linguistic reference materials and dictionary conventions. If your use case requires treating Y as a vowel, deselect it from the consonant filter checkboxes.
Case is fully preserved. An uppercase "B" duplicates to "BB" (not "Bb" or "bb"). The matching is case-insensitive - both "b" and "B" are recognized as consonants - but the output reproduces the exact casing of the original character. This ensures proper noun formatting and sentence capitalization remain intact.
Characters outside the ASCII A - Z range pass through completely unchanged. This includes accented Latin characters (Γ©, Γ±, ΓΌ), Cyrillic (Π‘, Π’, Π“), CJK ideographs, Arabic script, emoji, and all Unicode symbols. The consonant set is strictly the 21 English consonant letters. Extending to other alphabets would require language-specific consonant definitions, which this tool does not attempt.
English text has a consonant density of approximately 0.40-0.62 (depending on whether spaces and punctuation are counted). For pure alphabetic text, consonant density averages around 0.60. At a duplication factor of n = 10, the expansion ratio R = 0.60 Γ— 10 + 0.40 = 6.4Γ—. A 1,000-character input could produce up to 6,400 characters. The tool enforces a 10,000-character input limit to keep processing instantaneous.
Yes. The consonant filter panel lets you select or deselect individual consonants. For example, to create a stuttering effect, enable only B, D, G, and P (the plosives). To emphasize sibilance, enable only S and Z. The "Select All" and "Deselect All" buttons provide quick toggling. Your filter selection is saved to localStorage and restored on reload.
No. Spaces, tabs, newlines, and all whitespace characters are not consonants and pass through unmodified. Word boundaries, paragraph structure, and line breaks remain exactly as entered. Only individual consonant characters within words are repeated.
A find-and-replace would require 21 separate operations (one per consonant) and careful ordering to avoid replacing already-duplicated characters. This tool processes each character exactly once in a single left-to-right pass, guaranteeing no double-application. It also preserves case and respects the selective filter - features that would require complex regex patterns to replicate manually.