Text Cleaner
Paste your text, tick the options, and the cleaned result updates instantly.
Your last settings were restored.
Your text is not sent to a server. It is processed inside your browser.
How this is calculated
See the formula and an example
How the cleaning works, with an example
This tool replaces text using regular expressions (regex: rules that find patterns of characters). For example, finding line break characters (\n, \r\n) and replacing them with a single space joins lines that were split into one paragraph.
Line break (\n) becomes a single space
If you also turn on Keep blank lines, two line breaks in a row are treated as a paragraph break and left as they are, so you can remove line breaks and extra spaces while keeping the paragraph structure. The size (bytes) in the stats bar is measured in UTF-8: Korean characters usually take 3 bytes, while English letters and digits take 1 byte.
How to use
How the text cleaner works
This text cleaner fixes messy copy in one step. Text from a PDF, an email or a chatbot often brings a line break at the end of every line, double spaces, tabs, stray bullets and characters you cannot see. Paste it on the left, tick the cleanups you want, and the cleaned version appears on the right. A before-and-after count shows what was removed, and Copy result puts the clean text on your clipboard. Your last settings are remembered.
What each option does
- Remove line breaks turns every line break into a single space, the fix for text copied from a PDF or an email with a hard return on each line.
- Keep blank lines (paragraphs) joins wrapped lines but keeps a blank line between paragraphs. It is only available when line-break removal is on.
- Collapse repeated spaces replaces two or more spaces or tabs in a row with a single space.
- Trim spaces at line start and end removes leading and trailing spaces on every line, handy for indented code and email replies.
- Remove tab characters turns each tab into a space. Combine it with collapsing spaces to flatten tab-separated columns.
- Remove bullet symbols deletes a bullet or dash at the start of a line, such as •, ·, –, ◦ or *, with the space after it; a hyphen inside a sentence is safe.
- Remove invisible characters strips zero-width spaces, joiners and the byte-order mark, and turns non-breaking spaces into ordinary spaces. These hidden characters break searches, code and formulas.
- Remove special characters keeps letters in any language, numbers, spaces and basic punctuation, and deletes symbols, emoji and other punctuation.
Common situations and the settings that fix them
- Text from a PDF with a hard return on each line: turn on Remove line breaks, Keep blank lines and Collapse repeated spaces.
- A list you want on one line: turn on Remove line breaks and Remove bullet symbols, with Keep blank lines off.
- A form that rejects odd input: turn on Remove invisible characters and Remove tab characters.
- A word hyphenated across two PDF lines stays split; after joining, search for “- ” and fix it by hand.
A quick before-and-after example
Suppose you copy three lines from a PDF: “The quarterly report shows”, “steady growth in all”, “regions this year.” With Remove line breaks and Collapse repeated spaces ticked, the cleaner returns one tidy sentence, and the count barely changes because each line break became a space.
A note on privacy
Nothing you paste is uploaded. The cleanup runs in your browser, so private text stays on your device. Only your option choices are stored, never the text.
Frequently asked questions
How do I remove line breaks from text?
Paste the text and keep Remove line breaks ticked. Every line break becomes a space; turn on Keep blank lines if you want paragraph breaks to stay.
How do I get rid of double spaces?
Tick Collapse repeated spaces: any run of two or more spaces or tabs becomes one space. It is on by default.
What are invisible characters, and how do I know I have them?
They take up no visible space, such as zero-width spaces, joiners, the byte-order mark and non-breaking spaces. A character count that changes when you tick Remove invisible characters is a good sign.
Will Remove special characters delete accented letters?
No. It keeps letters from any alphabet, including accented Latin, Greek, Cyrillic and Korean, plus digits, spaces and basic punctuation. It removes symbols, emoji and other punctuation such as slashes and the at sign.
Is my text saved anywhere?
No. Only your checkbox choices are saved in your browser; the text itself is never stored or sent.
Related tools
How this tool is checked
Last regular check
How it calculates The ticked cleanups use regular expressions to replace line breaks, repeated spaces, tabs, bullets and invisible characters.
How we check Before release, results go through calculation regression tests plus screen and accessibility checks, and the check date changes only when these checks pass again.
Run by Toolssok · About · Report an error