Text Formatter Online: Five Cleanup Jobs Almost Everyone Needs
Updated 2026-10-13 · 7 min read
Text almost never arrives clean. Copy a paragraph out of a PDF and every line ends in a hard break. Copy a reply out of an email thread and every line carries a quote marker. Copy a column out of a spreadsheet and you inherit tabs, padding spaces and inconsistent casing. The good news is that the damage is predictable, which means the cleanup is too.
Why pasted text arrives broken
Three mechanisms do most of the damage. Knowing which one you are looking at tells you which tool to reach for.
- PDF layout is positional rather than structural. A PDF stores every line at a coordinate, so copying it inserts a hard line break at each visual line end, including in the middle of a sentence
- Email threads prefix each line with a quote character such as a greater than sign, and repeated replies nest those markers several levels deep
- Spreadsheets export tab separated values and pad columns with spaces, both of which survive a copy and paste intact
Job one: collapse runs of whitespace
Replace every run of two or more spaces with a single space, and every run of blank lines with a single blank line. This is the least glamorous step and it fixes the most visible damage, because doubled spaces after pasted sentences are the first thing a reader notices.
Job two: remove duplicate lines
Lists assembled from several sources routinely contain the same entry twice, usually with a trailing space or different capitalisation so your eye slides past it. Deduplicating is a one click job once you have decided how strict the comparison should be, and it is worth doing before you count anything, because the count will otherwise be wrong.
Job three: fix inconsistent casing
Text merged from different sources mixes sentence case headings with capitalised ones and the occasional ALL CAPS label. Converting the whole document to sentence case and then restoring the few proper nouns by hand is faster than fixing it line by line.
Job four: count what you have
Once the text is clean, measure it, because whatever number you were quoting before cleanup was inflated by stray line breaks and duplicate entries.
Job five: turn a heading into a slug
If the cleaned text is a heading that is about to become a page, the last step is converting it into a URL slug. Do this after cleanup rather than before, or you will bake stray punctuation into a permanent address.
The order matters
Running these in the wrong sequence means some of them have to be done twice.
- Strip quote markers and collapse whitespace first, so every later step sees clean input
- Remove duplicates second, so the count that follows is accurate
- Fix casing third, so duplicate detection has already finished with the original values
- Count fourth, because counting is the step you will be most tempted to do first
- Generate the slug last, and only if the text is going to become a page
Start with one of these
Every tool below runs in your browser. No download, no account.
Remove Duplicate Lines
Clean duplicate lines out of any list, with optional sorting.
Case Converter
Uppercase, lowercase, title case, sentence case and camelCase.
Word Counter
Live word count, plus sentences, paragraphs and reading time.
Character Counter
Character count with and without spaces, plus platform limits.
URL Slug Generator
Turn any title into a clean, SEO-friendly URL slug.
Lorem Ipsum Generator
Placeholder text by paragraph, sentence or word count.
Frequently asked questions
Does pasting text into a browser tool upload my data?
How do I remove line breaks from text copied out of a PDF?
Why does my pasted list contain invisible characters?
Should I fix casing before or after removing duplicates?
More guides
- How to Remove Duplicate Lines From a List Without Corrupting Your Data
- Character Count vs Word Count: What Each One Actually Measures
- How to Convert Text to Title Case Online (And When Not To)
- Lorem Ipsum Generator: Where the Text Comes From and How Much You Need
- URL Slug Generator for SEO: How to Write Slugs Google Understands
- How to Reduce Word Count Without Gutting Your Argument
- How to Count Characters in Google Docs (and Every Other Editor)
- The X Character Limit: What Counts Toward the 280 and What Does Not
- How Many Words Is a 5 Minute Speech? Speaking Rates That Actually Work
- What Counts as a Word? Hyphens, Numbers and Acronyms Explained
- How to Write a Meta Description That Earns the Click
- Capitalization Rules in English: The Ones That Cover Almost Everything
- How to Remove Line Breaks From Copied Text (Without Losing Paragraphs)
- The Best Free Online Writing Tools, and What Each One Is Actually For