How to use
Paste your text into the box and turn on whichever checkboxes below match what you need — the result keeps updating as you edit. You can enable several options at once; whatever order you check them in, they’re applied in a fixed order (see “Order of operations” below). Copy the result with the button next to it.
Cleanup options
- Trim each line: removes leading and trailing spaces and tabs from every line, without touching whitespace in the middle of a line.
- Collapse multiple spaces into one: shrinks runs of two or more spaces down to one. Tabs and line breaks aren’t affected.
- Remove all spaces and tabs: strips out every remaining space and tab. Line breaks are left alone.
- Remove empty lines: deletes lines that have no content, or only whitespace.
- Convert tabs to spaces: replaces each tab character with a single space. If the tabs were being used to line up columns like a table, this can throw off the alignment.
- Normalize non-breaking and full-width spaces: converts the non-breaking space (U+00A0) and the full-width space (U+3000, a wide space common in CJK input methods) into a regular space (U+0020).
- Remove line breaks: joins every line into one. You can choose whether lines are joined with a space or with nothing at all.
Order of operations
When several options are on, they’re applied in this order: normalize special spaces → convert tabs → trim each line → remove empty lines → remove line breaks → collapse multiple spaces → remove all spaces. Collapsing runs of spaces happens after line breaks are removed, so any extra spaces created where lines get joined are cleaned up too.
Privacy
Your text is processed inside this browser only. It is not saved or sent anywhere, and it disappears when you close the page.