Text Formatter

Clean up messy text in seconds. Remove duplicates, sort lines, strip HTML, collapse whitespace — pick your operations and hit Apply.

Whitespace

Lines

Text

0 words0 chars

When do you actually need a text formatter?

More often than you'd think. Copy text from a PDF and you get random line breaks in the middle of sentences. Export a CSV and suddenly there are trailing spaces breaking your spreadsheet formulas. Pull a list from a database and half the entries are duplicated. These aren't edge cases — they're the daily grind of anyone who works with text.

Common use cases

  • • Cleaning email lists before importing to a CRM
  • • Fixing PDF copy-paste that adds extra line breaks
  • • Deduplicating keyword lists for SEO campaigns
  • • Sorting items in a content outline alphabetically
  • • Stripping HTML from scraped content
  • • Normalizing data exports before processing

Operations run in order

  • • Whitespace ops run first (trim, collapse, trailing)
  • • Blank line removal comes after trimming
  • • Sort and deduplicate run on the cleaned lines
  • • Line numbers are added after sorting
  • • Wrap and join apply last
  • • HTML stripping happens at the end

Remove duplicate lines — the most requested feature

Got a list of 500 keywords and no idea how many are repeated? Paste them in, tick “Remove duplicate lines” and Apply. The output keeps the first occurrence of each line and drops everything after. It's case-sensitive, so “Apple” and “apple” count as different lines — useful if you need to preserve casing distinctions.

Sorting lines alphabetically

Sorting uses locale-aware comparison, so accented characters sort reasonably rather than falling to the bottom. A-Z sorts ascending, Z-A sorts descending. If you first deduplicate then sort, you get a clean unique-sorted list in one pass — just tick both options.

Wrapping long lines

The wrap operation breaks lines at word boundaries, so words don't get split mid-word. The default is 80 characters — the classic terminal width — but you can set it anywhere from 10 upwards. Useful for pasting into code comments, plain-text emails, or any context where long lines cause problems.

Everything stays in your browser

No text you paste here ever leaves your device. All formatting runs locally in JavaScript — nothing is sent to a server. That makes it safe to use with confidential content: internal docs, client data, code snippets with API keys. Same principle as the word counter on the homepage.