Skip to content

Remove All Whitespace

Delete every space, tab and line break to get one continuous string.

  • Free
  • Real-time
  • Runs locally
Removes as you type
Ln 1, Col 1

Options

Replace removed whitespace with

Spaces

0

Removed

Tabs

0

Removed

Line breaks

0

Removed

Invisible

0

Removed

0 removed

Strip every bit of whitespace from your text in one go. Spaces, tabs, line breaks, non-breaking spaces and invisible characters such as zero-width spaces are all removed, leaving one continuous string.

That is exactly what you need for codes, IDs, phone or card numbers, Base64 data, hashes and minified values. Choose which kinds of whitespace to remove, or replace each gap with your own text, such as a dash or a comma, to join words and lines into a single line.

01

How to remove all whitespace

  1. STEP 01

    Paste your text

    Paste text, code, numbers or a list. The result without whitespace appears below as you type.

  2. STEP 02

    Pick what to remove

    Keep the defaults to remove everything, or switch off spaces, tabs, line breaks or invisible characters.

  3. STEP 03

    Copy the result

    Optionally replace each gap with custom text, then copy or download the result.

02

Features

  • Every kind of whitespace

    Regular, no-break, thin, em and ideographic spaces, tabs, and LF, CRLF and Unicode line separators.

  • Invisible characters too

    Zero-width spaces, byte order marks and soft hyphens that you cannot see are removed as well.

  • Emoji stay intact

    The hidden joiners inside combined emoji such as 👨‍👩‍👧 are kept, so emoji are never broken apart.

  • Replace instead of delete

    Replace each run of whitespace with a dash, comma, underscore or any text you like.

  • Choose what to remove

    Remove only line breaks, only spaces, or any combination, with a count for each kind.

  • Large text, instantly

    Process megabytes of text in your browser without uploading anything.

03

When to remove all whitespace

Removing every space and line break is useful whenever text must be one unbroken string:

  • Cleaning IBANs, card numbers, phone numbers or product codes copied with spaces.
  • Joining Base64, hex or hash values that were wrapped over several lines.
  • Comparing two strings where only the spacing differs.
  • Turning a list or phrase into a single token joined with dashes or commas.
04

Frequently asked questions

What counts as whitespace?

Spaces of every kind (including no-break and thin spaces), tabs, and line breaks, including Windows CRLF and Unicode line separators. With “Invisible characters” on, zero-width spaces, word joiners, byte order marks and soft hyphens are removed too.

How is this different from Remove Extra Spaces?

Remove Extra Spaces tidies text for reading: it collapses doubled spaces and trims lines but keeps single spaces between words. This tool removes all whitespace, so words are joined together.

Can I replace spaces with dashes or commas?

Yes. Choose “Custom text” and type the replacement. Each run of whitespace becomes one copy of it, and no copy is added at the very start or end.

Can I remove only line breaks?

Yes. Turn off Spaces, Tabs and Invisible characters to remove only line breaks. Our Remove Line Breaks tool offers more options for joining paragraphs.

Will emoji be damaged?

No. The zero-width joiners that combine emoji are recognised and kept; only stray joiners between ordinary characters are removed.

Is my text uploaded?

No. Whitespace is removed in your browser and nothing is sent to a server.