Skip to content
NMSnabbit.

Remove Spaces From Text

Delete all spaces and tabs from text while keeping line breaks.

Text Tools Runs in your browser

How do you remove all spaces from text?

Type “AB12 CD34 EF56” and out comes “AB12CD34EF56”. Every space and tab is deleted; line breaks are the one kind of whitespace deliberately spared, so a multi-line block keeps its rows while each row loses its gaps. Reach for it when a serial number, IBAN or token was pasted with formatting spaces the target field refuses to accept.

How to use the Space Remover

  1. 1 Paste the spaced-out value.
  2. 2 Spaces and tabs disappear from every line.
  3. 3 Line breaks stay, so rows remain rows.
  4. 4 Copy the compact string into the field that needed it.

What you can use it for

  • Stripping spaces from a code or token.
  • Joining a spaced-out number into one value.
  • Cleaning whitespace from pasted IDs.
  • Compacting text for a fixed-width field.

Frequently asked questions

Will it flatten my text onto one line?
No. Only horizontal whitespace goes. A three-line block returns as three lines, each with its internal spaces removed.
When should I trim instead of removing all spaces?
Trimming cleans edges and collapses doubles while keeping words apart. Use this tool only when the result must contain no spaces at all, like a voucher code or licence key.
Can I put the spaces back afterwards?
Not automatically. Word boundaries are gone once joined, so keep the original if there is any chance you will need the spaced version again.

Related tools

More Text Tools

More tools like this:

All Text Tools