Result
All calculations run locally in your browser: parsing, chart, export. Disconnect the network and the page keeps working.
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
- If you leave the replacement field empty, the tool falls back to an underscore "_" rather than removing the spaces — it does not treat an empty field as "delete with nothing left behind". Use the dedicated space-remover tool if you want spaces gone entirely.
- Only literal space characters (U+0020) are matched; tabs and non-breaking spaces pass through unchanged and won't be replaced.
- Consecutive spaces are replaced one for one: two spaces in a row become two copies of the replacement string, not one — if you want a single separator instead, collapse repeated spaces first with a "remove extra spaces" tool.
- The replacement string can be more than one character (like " - " or "%20"), and the tool doesn't validate it against filename or URL rules — check the target platform's own restrictions (reserved characters, case sensitivity) before using the result as a slug or filename.
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.