One pass to clean up messy text
Text copied from PDFs, emails, chat apps, OCR scans or old documents is often a mess: double spaces, spaces before commas, missing spaces after periods, lowercase sentence starts and stray blank lines. Fixing all that by hand is tedious. This text formatter applies a set of careful, predictable fixes at once, and every one of them can be switched on or off.
Example
the quick brown fox jumps over the lazy dog .it was a sunny day ,and everyone was outside!
i think we should meet at 10 o'clock ; what do you think ?The quick brown fox jumps over the lazy dog. It was a sunny day, and everyone was outside!
I think we should meet at 10 o'clock; what do you think?
What each text formatter option does
- Trim lines – removes spaces and tabs at the start and end of every line. When off, only trailing spaces are removed.
- Collapse spaces – turns runs of spaces, tabs and non-breaking spaces into a single space.
- Fix punctuation – removes spaces before
, . ; : ! ?and closing brackets, adds a missing space after commas and sentence ends, and reduces!!!!!to!!!. - Capitalize sentences – uppercases the first letter of each sentence, paragraph and list item, and the pronoun "i". Common abbreviations such as "e.g.", "i.e." and "etc." do not trigger a new sentence.
- Unwrap lines – joins hard-wrapped lines within a paragraph (typical of PDFs and plain-text emails) while keeping blank lines and list items.
- Dashes and ellipses – converts spaced hyphens to em dashes, number ranges like 10-12 to en dashes and three dots to an ellipsis character.
- Quotes – keep them as they are, convert curly quotes to straight ones (safer for code and CSV), or straight quotes to typographic curly quotes (nicer for publishing).
- Blank lines – keep, collapse multiple blank lines into one, or remove them entirely.
- Line endings – LF (Linux, macOS), CRLF (Windows) or CR (classic Mac).
Zero-width spaces and byte order marks, invisible characters that often sneak in from web pages and cause strange bugs, are always removed.
Where it helps
- Cleaning up text extracted from PDFs before pasting it into a document or CMS.
- Normalizing survey answers, product descriptions or support tickets before analysis.
- Preparing copy for publication with consistent typographic quotes and dashes.
- Making text files consistent before committing them or comparing them in a diff checker.
Processing order
Fixes are applied in a fixed order: line endings are normalized first, then lines are unwrapped, spaces collapsed and lines trimmed, then punctuation, quotes, dashes and capitalization are handled, and finally blank lines and the chosen line ending are applied. This order means, for example, that a sentence joined by unwrapping is still capitalized correctly.
Things to watch
Automatic fixes are rules, not a grammar checker. Capitalization may miss proper nouns in the middle of sentences, and punctuation rules assume English conventions (French, for example, puts a space before ? and !). Code, URLs and data files should not be run through punctuation or quote fixes. For specific single tasks, see remove extra spaces, case converter or remove line breaks. All processing happens in your browser.