About the Remove Whitespace
Strip every whitespace character (spaces, tabs and line breaks) from your text, or keep the line breaks if you prefer.
Key features
- Strips every space, tab and line break
- Option to keep line breaks and strip only spaces/tabs
- Removes Unicode whitespace too (e.g. non-breaking spaces)
- Ideal for codes, keys, IBANs and phone numbers
- Instant results
- Private, in-browser
Remove all whitespace
Sometimes every space is unwanted: IBANs and card numbers copied with spaces, license keys and coupon codes formatted in groups, phone numbers, API tokens that wrapped across lines, or Base64 strings broken into 76-character lines. Remove Whitespace strips them all.
Examples
| Input | Output |
|---|---|
GB82 WEST 1234 5698 7654 32 | GB82WEST12345698765432 |
+44 20 7946 0958 | +442079460958 |
ABCD-EFGH IJKL | ABCD-EFGHIJKL |
| Base64 split over 3 lines | One continuous line |
Options
| Mode | Behaviour |
|---|---|
| Default | Removes spaces, tabs and line breaks |
| Keep line breaks | Removes spaces and tabs, one result per line |
Keeping line breaks is handy when you have a list of codes or numbers to clean at once.
Tips
- Hidden characters: text copied from web pages often contains non-breaking spaces (U+00A0) that look like normal spaces but break validation. This tool removes them.
- Don't use it on prose: words will run together. Use Remove Extra Spaces instead.
- JSON: use the JSON Minifier, which keeps spaces inside string values.
Related tools
Remove only line breaks with Remove Line Breaks, or tidy spacing with Remove Extra Spaces.
How to use the Remove Whitespace
- Type or paste your text into the input box.
- Choose the options you want.
- The result updates instantly as you type.
- Copy the output or download it as a .txt file.