Remove All Whitespace

Strip every space, tab and newline — one solid string.

The result updates as you type. Ctrl + Enter strips now.

Text without whitespace

How to remove all whitespace

Paste your text into Your text, or press Load example. Every space, tab and newline is deleted instantly and the solid string appears next to it, updating as you type. Copy the result or download it as a .txt file. Everything runs in your browser, so nothing you paste is uploaded.

Examples

InputOutput
hello world helloworld
a b c d abcd
Strip every bit of whitespace away. Stripeverybitofwhitespaceaway.

Limits and edge cases

  • Removes everything matched by \s: spaces, tabs, newlines, carriage returns, vertical tabs, form feeds, non-breaking spaces and other Unicode whitespace.
  • Unicode letters, accents, numbers, punctuation and emoji are kept exactly as typed.
  • This cannot be undone: once spaces and line breaks are gone, word boundaries are lost, so keep a copy of the original if you need it.

Frequently asked questions

How do I remove all whitespace from text?

Paste your text into the input box and every space, tab and newline is deleted instantly. Copy the result or download it as a .txt file.

What counts as whitespace?

Every character matched by the regex class \s: spaces, tabs, newlines, carriage returns, vertical tabs, form feeds, non-breaking spaces and other Unicode whitespace.

Will it remove line breaks too?

Yes. Newlines and carriage returns are whitespace, so the output is always a single continuous string with no line breaks.

Does it keep letters, numbers and emoji?

Yes. Only whitespace is deleted. Unicode letters, accents, numbers, punctuation and emoji stay exactly as they were.

Can I undo it?

No. Once spaces and line breaks are deleted there is no way to know where words used to split, so keep a copy of the original if you need it.

Is my text uploaded anywhere?

No. Stripping runs in your browser with JavaScript and nothing is sent to a server. Inputs under 200 KB are kept in your browser's local storage so they are still there when you come back.