Text Tools
Clean up text whitespace
Remove the spaces you can see, and the invisible characters you cannot.
- Free, no signup
- No upload — runs on your device
- No watermark
- Unlimited use
Remove Extra Spaces
Processed locallyThe character breaking your code is probably U+00A0
Copy a line of code from a web page, a Word document or a Slack message and paste it into an editor. It looks correct. It does not run. The space between two tokens is a non-breaking space, U+00A0, which renders identically to a normal space and is a completely different character to every parser on earth.
Word inserts them automatically. Web pages use for layout. Slack sometimes converts leading spaces. There are also zero-width spaces (U+200B) that occupy no visual width at all, and byte-order marks (U+FEFF) that lead a file and break JSON parsers with a message about an unexpected token at position 0.
None of these are visible in any editor without a "show invisibles" setting. This tool converts all three to ordinary spaces or removes them, and tells you how many it found — which is often the first confirmation that they were there.
How it works
- Paste your text
- Tick the cleanups you want
- Copy the cleaned text