Text Formatter
Strip the mess out of text somebody else wrote · runs in this tab, never sent anywhere
Input
What to fix
Whitespace
Lines
Case
Punctuation
Formatted
The tidied text appears here. Nothing is uploaded — every transform runs in this tab.
How the Text Formatter works
A text formatter you drive rather than one that decides for you. Every operation is a switch — collapse repeated spaces, strip trailing whitespace, remove duplicate or blank lines, sort lines, convert to upper, lower, title or sentence case, and tidy the punctuation of English prose. Nothing runs unless you turn it on, and the tool reports exactly what each switch changed, so the result is something to accept rather than something to re-read.
Every operation is a switch, and nothing runs until you turn it on. Collapse repeated spaces, strip trailing whitespace, remove blank or duplicate lines, sort lines, convert case, or tidy the punctuation of English prose — in any combination. The result appears beside the input as you type, and Replace input folds it back so you can run another pass.
The tool reports what each switch changed — "12 duplicate lines removed", "3 repeated words" — rather than handing back a rewritten document and leaving you to spot the difference. A rule that fired when it should not have is then visible instead of buried.
It does not fix grammar, and does not claim to. Agreement, tense and article choice need either a server or a WebAssembly language model; this site has no backend, and its Content-Security-Policy does not permit WebAssembly. What is here instead is the mechanical layer — repeated words, spacing around punctuation, straight quotes, capitalisation — where the right answer is a rule rather than a judgement. Those four are English typographic convention and are off by default, since French spaces its punctuation differently and CJK does not space it at all.
Common questions
Can it fix grammar?
No, and it says so rather than pretending. Real grammar correction — agreement, tense, article choice — needs either a server or a WebAssembly language model, and this site has no backend and a Content-Security-Policy that does not permit WebAssembly. What it does instead is the mechanical layer people usually mean: repeated words, missing spaces after punctuation, spaces before punctuation, straight quotes, and capitalisation. Those are typography, where the right answer is a rule rather than a judgement.
What does "remove duplicate lines" keep?
The first occurrence of each line, in its original position, comparing the whole line exactly. Blank lines are never deduplicated, since they are what separates paragraphs and collapsing them would silently reflow the document into one block.
How does title case handle acronyms?
It leaves them alone. Any word with a capital letter after its first — JSON, iPhone, McCarthy — is passed through untouched, because lowercasing it to re-capitalise the first letter would turn JSON into Json. Minor words like "of" and "the" stay lowercase unless they open or close the line.
Will it break my code, URLs or decimal numbers?
The punctuation rules are written to avoid exactly that. A space is never inserted after a comma or colon that is followed by a digit, so 1,000 and 12:30 survive. A full stop only gains a space between a lowercase run and a capital, which leaves e.g., Node.js, 3.14 and utildock.dev untouched. The smart-quote rule skips anything inside backticks.
Is my text sent anywhere?
No. Every transform runs in a Web Worker inside your own tab, and there is no server of ours that could receive the text. It works with the network disconnected.