FormatterHQ

Text Formatter and Cleaner

Paste messy text and get it tidy: extra spaces removed, punctuation spacing fixed, sentences capitalized, quotes and dashes normalized and blank lines under control.

Input TEXT
Output TEXT
Ready.

How to use the Text Formatter

  1. Paste your text or open a .txt or .md file.
  2. Tick the fixes you want: trimming, collapsing spaces, punctuation, capitalization, unwrapping lines or typographic dashes.
  3. Choose how to handle quotes, blank lines and line endings.
  4. Copy or download the cleaned text; the status line shows how many characters were removed.

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.

Frequently asked questions

Will the text formatter change my words?
No. It only changes whitespace, punctuation spacing, capitalization at sentence starts, quote and dash characters and line breaks. The words themselves are never altered.
How do I fix text copied from a PDF?
Enable unwrap lines to join hard-wrapped lines into paragraphs, keep collapse spaces and trim on, and set blank lines to collapse.
Should I use straight or curly quotes?
Use straight quotes for code, CSV, JSON and anything processed by software. Curly (typographic) quotes look better in published articles and books.
Why were some sentences not capitalized?
The formatter recognizes sentence ends by punctuation followed by a space. Text without proper sentence punctuation, or after abbreviations like e.g., is left unchanged on purpose.
Does it work with languages other than English?
Whitespace, blank-line and line-ending fixes work for any language. Punctuation spacing and capitalization follow English conventions and may not suit every language.

Last updated September 26, 2026

Related tools