Remove whitespace from text
Delete spaces, tabs and line breaks from your text. Choose whether to remove all of it, only the spaces and tabs, or only the edges of each line.
How it works
-
Paste your text
Type or paste the text in the left box, or open a .txt file. No text to hand? Click Example.
-
Instant result
The result appears as you type. Change the options and see straight away what changes.
-
Copy or download
Copy the result with one click, save it as a file or use it as input for a next step.
Three modes
- All whitespace:
A sentence with spacesbecomesAsentencewithspaces. Spaces, tabs, line breaks and hard spaces all go. - Spaces and tabs, keep lines: the text keeps its line breaks, but each line loses its spaces.
- Only the start and end of each line: leading and trailing whitespace is trimmed, and the spaces between words stay.
Uses
Compacting codes and IDs that were copied with stray spaces, preparing strings for comparison, or trimming a list of values. If you'd rather keep single spaces between words, use remove double spaces or normalize whitespace.
Frequently asked questions
Is the remove whitespace free?
Yes. The remove whitespace is completely free, with no account, sign-up or usage limit.
Is my text stored?
No. Your text is processed in your browser and is not sent to a server or stored.
Is there a maximum length?
No, there is no fixed limit. Very long texts can just be a little slower.