Overview
Introduction
Doubling letters by hand is tedious and error-prone, especially across a long passage, but a small script can do it instantly and consistently.
It runs entirely client-side, so nothing you paste is ever uploaded to a server.
What Is Letter Duplicator?
A letter duplicator that inserts a copy of each letter directly after itself, or after every Nth letter if you only want a partial effect.
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 Letter Duplicator Works
The tool walks through the input character by character, counting only letters, and appends an extra copy of a letter whenever the running letter count is a multiple of N.
Non-letter characters like spaces, digits, and punctuation are copied through untouched and don't affect the counting.
When To Use Letter Duplicator
Use it to create a stylized 'stuttering' or emphasis effect in text, or to stress-test a UI or font with doubled 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 String Repeater and Letter Remover.
Features
Advantages
- Configurable frequency via N, not just an all-or-nothing duplication.
- Preserves the case of every duplicated letter automatically.
- Counts letters separately from everything else, so spaces and punctuation never shift the duplication cadence partway through a phrase.
Limitations
- Only letters are duplicated; digits and symbols are never doubled.
- Matches the English alphabet only, so accented and non-Latin letters are neither doubled nor counted towards N.
Examples
Best Practices & Notes
Best Practices
- Use N=1 for a strong stylistic effect, or a higher N for a subtler variation.
- Keep the input short when using N=1, since doubling every letter makes longer passages genuinely hard to read.
- Check the result where it will actually be used, because doubled letters defeat spell-checking and are read out literally by screen readers.
Developer Notes
The implementation tracks a separate `letterIndex` counter incremented only when `/[a-zA-Z]/` matches the current character, so N counts letters exclusively and non-letter runs never shift the duplication cadence.
Letter Duplicator Use Cases
- Creating stylized or 'stuttering' text for creative writing
- Stress-testing a font or text layout with doubled characters
- Generating quick test strings with a predictable letter pattern
Common Mistakes
- Expecting spaces or punctuation to be duplicated along with letters.
- Setting N to 0, which isn't a valid frequency.
Tips
- Combine with a monospace font to see the doubling effect most clearly.
- A higher N produces a more natural-looking irregular stutter, because the doubled letters land at different points within each word.