Text Formatter

Clean up text pasted from PDFs and documents, spacing, quotes and line breaks.

Output updates as you type.


Result will appear here.

Features

  • Collapse repeated spaces and blank lines
  • Convert between straight and typographic quotes
  • Rejoin hard-wrapped lines into flowing paragraphs
  • Strip HTML tags and invisible control characters
  • Every transformation is individually toggleable

How to use it

  1. Paste the messy text into the top box.
  2. Turn on the cleanups you want.
  3. Check the result below.
  4. Copy or download the cleaned text.

What actually breaks when you copy text

Text copied from a PDF is the worst offender. PDFs store glyph positions rather than flowing text, so extraction inserts a line break at the end of every visual line. Paste that into a document and each line becomes its own paragraph, ignoring the window width entirely. The unwrap option fixes this by joining lines that end mid-sentence while preserving genuine paragraph breaks, blank lines and lines ending in terminal punctuation.

Invisible characters are the ones that cause mysterious bugs. Non-breaking spaces (U+00A0) look identical to normal spaces but do not match \s in some contexts and break word wrapping. Zero-width spaces, soft hyphens and byte-order marks are completely invisible yet corrupt string comparisons, break CSV parsing and cause a search for a word to fail against text that visibly contains it. The invisible-character option strips them.

Smart quotes are a genuine trade-off rather than a mistake. Typographic quotes and apostrophes look better in prose and are correct for published writing. They break code, CSV files, JSON and command-line input, where only straight quotes parse. Convert to straight quotes when the text is headed anywhere a machine will read it, and to smart quotes when it is headed for a reader.

Frequently asked questions

Yes, completely. Text Formatter is free with no usage limits, no account and no sign-up. There is no paid tier and no trial that expires. Tools marked Premium on this site carry that label to indicate a deeper feature set, not a price.
Text Formatter covers collapse repeated spaces and blank lines, convert between straight and typographic quotes, rejoin hard-wrapped lines into flowing paragraphs, among other things. Everything is available immediately with no account, no sign-up and no usage limit.
Text copied from a PDF is the worst offender. PDFs store glyph positions rather than flowing text, so extraction inserts a line break at the end of every visual line. Paste that into a document and each line becomes its own paragraph, ignoring the window width entirely. The unwrap option fixes this by joining lines that end mid-sentence while preserving genuine paragraph breaks, blank lines and lines ending in terminal punctuation.
Everything happens inside your browser. The text you enter is processed by JavaScript running on your own device and is never sent to a server, there is no backend to send it to. You can confirm this in your browser's Network tab while you use the tool. Because nothing depends on a server, the tool also keeps working offline once the page has loaded, the site registers a service worker that caches it after your first visit.

Related tools

Further reading

πŸ“– Clean Up Messy Text: Fix Spacing, Line Breaks and Formatting Fast

Read the full guide on the 123MiniApps blog.

Pick a theme

Ten hand-tuned palettes.