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

  1. Paste the text.
  2. Choose what to remove.
  3. 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.