glyphcount

Text Cleaner

Clean pasted text in one pass: trim lines, collapse extra spaces, remove duplicates and smart quotes — 13 rules plus find & replace, all local.

Thirteen cleaning rules — from "collapse double spaces" to "remove duplicate lines" — plus find & replace — run in one pass over your text, in the order you toggle them. A novel-length paste cleans in under a second, entirely in your browser.Pasted text from PDFs and web pages typically carries trailing spaces on every line and doubled blank lines; cleaning before counting or comparing removes the junk metrics those artifacts create.

Written by Nan Liang · Updated November 2026

Frequently asked questions

What does "straighten smart quotes" do?

It converts curly quotes (“ ” ‘ ’) to straight ones (" ' ), and en/em dashes (– —) to hyphens. Useful when pasting into code, CSV files, or systems that mangle Unicode punctuation.

Can I undo cleaning?

Yes. The original text is kept in memory until you press Clean again or leave the page. A one-click restore brings it back.

Why is my line count wrong after pasting from a PDF?

PDF copies often include hard line breaks at every visual line and non-breaking spaces. Turn on "remove line breaks" and "fix non-breaking spaces" before counting.

Does it remove formatting like bold or links?

This tool works on plain text only. Paste with Ctrl+Shift+V (Cmd+Shift+V on Mac) to drop formatting at the source, then clean.

Next steps

Cleaned up? Run the Word Counter to see whether the cleanup changed your numbers.

Open the Word Counter →