Blog
Text tools

Space replacer online

Paste your text, choose a replacement string, and every space is swapped for it. A common use case is turning a title into a URL slug or a filename that isn't allowed to contain spaces.

Your data never leaves this device

Result

Spaces replaced

This page has no server side at all. The table you paste is parsed by JavaScript inside your own browser, the chart is drawn on a canvas element on your machine, and the export file is assembled locally. Nothing is uploaded, stored or written to any log. You can disconnect from the network after the page has loaded and everything will still work — which is the simplest way to verify the claim yourself.

Facts and limits of this method

Default replacement Underscore "_"
Character replaced The regular space (U+0020) only
Empty replacement field Falls back to the underscore, not to an empty string
Consecutive spaces Each one is replaced individually, not collapsed into one
Replacement length Can be more than one character, e.g. " - " or "%20"
Typical uses URL slugs, filenames, code identifiers

When it misleads you

How it is calculated

The tool reads the replacement string from the field next to the text — if it's left empty, an underscore is used instead.

It counts every regular space character in the text.

Each space is then replaced with the chosen string, one for one — nothing is collapsed or merged.

Everything else in the text — letters, punctuation, tabs, line breaks — is left exactly as it was.

Questions and answers

What happens if I leave the replacement field empty?

The tool falls back to an underscore "_" rather than deleting the spaces outright. If you want spaces removed with nothing put in their place, use the space-remover tool instead.

Can the replacement be more than one character?

Yes — you can use a multi-character string like " - " or "%20". The tool doesn't check whether the result is valid for any specific platform.

Is this good for making URL slugs?

It handles the space-to-dash (or space-to-underscore) part well, but it won't strip other punctuation from the title — combine it with another cleanup tool if your title has quotes, colons or similar characters.

What happens with two spaces in a row?

Each space is replaced independently, so two consecutive spaces become two copies of the replacement string, not one.

Is my text sent anywhere?

No. Everything runs in your browser; the text is never transmitted.

Related tools

All tools