Remove Whitespace
Strip all whitespace characters including spaces, tabs, and newlines from text.
Remove whitespace from text. Choose All whitespace to delete every space, tab and line break (useful for codes, keys and numbers copied with spaces), Spaces and tabs only to keep the line structure, or Line breaks only to join lines into one without removing the spaces between words. Non-breaking spaces count as spaces too. The result updates as you type.
Common use cases
- Remove spaces from a card number, IBAN or licence key before pasting
- Join a list into one line
- Clean up an encoded string that was wrapped across lines
How to use
- Paste the text.
- Choose what to remove.
- Copy the result.
FAQ
How do I only remove double spaces?
Use the remove duplicate spaces tool, which turns runs of spaces into one and keeps the words apart.
How do I remove spaces at the start and end of lines?
Use the trim whitespace tool.
Related tools
- Trim WhitespaceRemove leading and trailing whitespace from text or each line.
- Remove Duplicate SpacesReplace multiple consecutive spaces with single spaces throughout text.
- Remove PunctuationRemove all punctuation marks from text while keeping letters and numbers.
- Sort Lines AlphabeticallySort all lines of text in alphabetical or reverse alphabetical order.
- Reverse LinesReverse the order of lines in text from last to first.
- Deduplicate LinesRemove duplicate lines from text keeping only unique entries.