Skip to content
Expensico

Text Formatter & Cleaner

Clean up messy text: trim spaces, remove line breaks or blank lines, de-duplicate and sort lines, and strip formatting from pasted content.

Runs in your browser. Everything you enter stays on your device. Nothing is sent to a server.

How to use the Text Formatter & Cleaner

  1. Paste your text.
  2. Click any operation to apply it; combine as many as you need.
  3. Undo if something isn't right, then copy or download.

Fixing text copied from PDFs and emails

Text copied from PDFs often has a line break at the end of every line. “Remove line breaks (keep paragraphs)” joins wrapped lines back into flowing paragraphs while keeping the blank lines between paragraphs. Follow with “Collapse extra spaces” to tidy any double spaces.

Working with lists

Paste a list of names, emails or IDs — one per line — then remove duplicates, sort, or number them. “Natural sort” orders numbers the way people expect (item 2 before item 10), unlike plain alphabetical sorting.

Smart quotes and special characters

Word processors replace straight quotes with curly ones and hyphens with dashes. That's fine for documents but breaks code, CSV files and some forms. “Smart quotes → straight” converts them back.

Example: cleaning up a list of email addresses

You've copied attendee emails from three spreadsheets and some appear twice, a few have stray spaces, and there are blank lines between the blocks. Apply, in order:

  1. Trim each line — removes spaces before and after each address.
  2. Remove blank lines — joins the three blocks into one list.
  3. Remove duplicate lines — keeps the first copy of each address.
  4. Sort A → Z — makes the list easy to scan.

Trim before removing duplicates: otherwise asha@example.com and asha@example.com with a trailing space count as different lines. If a step does the wrong thing, Undo goes back up to 20 steps.

Frequently asked questions

Is my text sent anywhere?

No. Every operation runs in your browser.

Which operations are available?

Trim lines, collapse spaces, remove blank lines, join wrapped lines into paragraphs, remove duplicates, sort A→Z or Z→A, natural sort, reverse, shuffle, add or remove line numbers, straighten smart quotes, and remove punctuation or non-ASCII characters.

Is removing duplicates case-sensitive?

Yes — lines must match exactly. For case-insensitive de-duplication, convert everything to lower case first with the case converter, then remove duplicates.

Will “Remove non-ASCII characters” delete Hindi or other scripts?

Yes. It keeps only basic English letters, digits and symbols, so don't use it on text in Indian languages or with accents you want to keep.