Overview
Introduction
Extra-letter typos, typing "theat" instead of "that", are one of the most common typing mistakes alongside transpositions, and generating realistic-looking versions of them is useful for testing typo tolerance.
This tool runs entirely client-side, so nothing you paste is ever uploaded to a server.
What Is Random Letter Adder?
A random letter adder that inserts one random lowercase letter at a random position inside each word of three or more characters in your text.
It complements a letter swapper, which simulates transposition typos, by instead simulating the insertion-style typo where an extra keystroke sneaks into a word.
How Random Letter Adder Works
The tool splits the input into whitespace-separated tokens, and for each token of three or more characters, picks a random lowercase letter and a random insertion position within it.
The letter is spliced into the word's string at that position, and all tokens are rejoined with their original spacing preserved.
When To Use Random Letter Adder
Use it to generate realistic typo variants for testing a spell checker, fuzz-test search or autocomplete input handling, or create deliberately imperfect sample text for a proofreading exercise.
It's a fast way to get varied, plausible-looking typos without hand-editing text or writing a one-off script.
Often used alongside Letter Swapper, Random Word Adder and Word Order Reverser.
Features
Advantages
- Targets every eligible word rather than requiring you to pick which words to modify.
- Simple, predictable rule (insert one letter per word of 3+ characters) that's easy to reason about.
- Inserts at most one letter per word, so the text stays recognizable rather than degrading into unreadable noise.
Limitations
- Every eligible word is affected every time; there's no probability control to leave some words untouched.
- Uses randomness, so results aren't reproducible between runs.
Examples
Best Practices & Notes
Best Practices
- Run the tool multiple times if you need several distinct typo variants of the same source text.
- Combine with a letter swapper for text that mixes both insertion and transposition typos.
- Keep the original alongside the output when building test data, since the insertions are random and cannot be reversed.
Developer Notes
Each eligible token gets a letter inserted with `word.slice(0, position) + letter + word.slice(position)`, where `position` is `Math.floor(Math.random() * (word.length + 1))`, so insertion can land anywhere from before the first character to after the last.
Random Letter Adder Use Cases
- Generating realistic typo test cases for a spell checker or autocomplete feature
- Fuzz-testing text input handling with plausible near-word data
- Creating imperfect sample text for a proofreading or editing exercise
Common Mistakes
- Expecting only some words to change; every word of three or more letters is affected on each run.
- Assuming the inserted letter is always interior; it can land at either end of the word too.
Tips
- Combine with a letter swapper tool for text with a mix of insertion and transposition typos.
- Words of one or two characters are skipped entirely, so short function words stay correct and the result still reads as a sentence containing typos.