Text Cleaner & Formatter · Text Formatter
Clean up messy pasted text — fix spacing, punctuation and capitalization instantly. Your data never leaves your browser.
Updated:
Input
Output
What the text cleaner & formatter does
Text Formatter cleans up messy plain text — the kind you get pasting from a PDF, a chat app or a scanned document, with extra spaces, missing capital letters, and punctuation stuck to the wrong word. It automatically fixes spacing, punctuation and capitalization so the result reads like normal, properly formatted prose, without you having to fix it by hand.
How to use the text cleaner & formatter
- Paste your messy text into the Input panel, or click Example to try a sample.
- Toggle which fixes to apply: Capitalize sentences, Fix punctuation spacing, Normalize whitespace, and Collapse blank lines.
- Check the cleaned result in the Output panel — it updates live as you change the text or the options.
- Click Copy to copy it, or Download to save it as a file.
How text formatting works
Text pasted from chat apps, PDFs or scanned documents often carries messy spacing, missing capitals and stray punctuation. This tool applies four independent, toggleable fixes in a fixed order — normalize whitespace, fix punctuation spacing, capitalize sentences, then collapse extra blank lines — so you can see exactly what each one changes:
// Before the meeting starts at 9am .please bring your laptop,and charger.dr. patel will lead the session... see you there! // After The meeting starts at 9am. Please bring your laptop, and charger. Dr. patel will lead the session... See you there!
Notice that "Dr." gets a capital because it starts a sentence, but "patel" keeps its lowercase "p" — the capitalization heuristic checks a small list of common abbreviations (Mr., Dr., vs., etc., e.g., i.e.) and deliberately skips forcing a capital right after one, since real sentence-boundary detection is a much harder problem than a client-side formatter can solve. It's a heuristic, not a guarantee: a numbered item like "Item 1. next point" has the same ambiguity, since "1." isn't a real abbreviation but isn't a sentence end either.
Examples
1. A hurried chat message. All four options on: spaces before commas and ! are removed, missing spaces after punctuation are added, the sentence after a period gets its capital, and the run of blank lines collapses to one. If what you pasted is a list rather than prose, the Line Sorter & Deduplicator is the better tool:
// Input Hi team ,the deploy is done. please check staging before 5pm ! thanks,see you tomorrow . // Output Hi team, the deploy is done. Please check staging before 5pm! Thanks, see you tomorrow.
2. Notes with commands, capitalization off. Uncheck Capitalize sentences when lines start with commands or identifiers that must stay lowercase; spacing and blank lines are still cleaned. For targeted fixes the four options don't cover, chain your own rules in the Bulk String Replacer:
// Input npm run build ,then npm test. run git push only if both pass . // Output npm run build, then npm test. run git push only if both pass.
Frequently asked questions
Is it safe to paste sensitive text into this Text Formatter?
Yes. All processing happens in your browser using native JavaScript; no text is ever sent to a server.
Will it capitalize after every abbreviation like "Mr." or "etc."?
No. It checks the word before the period against a small list of common abbreviations (Mr., Dr., vs., etc., e.g., i.e. and a few more) and skips forcing a capital letter after those. It's a heuristic, not full sentence-boundary detection, so unusual abbreviations may still get capitalized.
Does it break decimal numbers, times or ellipses?
No. A period between two digits (3.14), a colon between digits (12:30) and a comma between digits (1,000) are left untouched, and a run of punctuation like an ellipsis (...) or "?!" is treated as one unit instead of being split apart.
Can I turn off individual fixes?
Yes. Capitalization, punctuation spacing, whitespace normalization and blank-line collapsing are four independent toggles above the panels, all enabled by default.