Text Formatter
Clean up text pasted from PDFs and documents, spacing, quotes and line breaks.
Output updates as you type.
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
- Paste the messy text into the top box.
- Turn on the cleanups you want.
- Check the result below.
- 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
Related tools
Further reading
Read the full guide on the 123MiniApps blog.