Replace Spaces with Underscores or Hyphens

Swap spaces for underscores, hyphens, plus signs or nothing at all.

πŸ”’ Runs in your browser⚑ Instant resultsπŸ†“ Free, no sign-up

How to use Replace Spaces with Underscores or Hyphens

  1. Paste or type your text into the box. If you just want to see how Replace Spaces with Underscores or Hyphens behaves, press Load example.
  2. Look at the option above the boxes (Replace spaces with). The defaults suit most jobs, so change them only if you need to.
  3. Your result appears on the right as you type. There is no convert button to hunt for.
  4. Click Copy result to paste it somewhere else, or Download to save it as a text file. Use result as input lets you run a second conversion on the output.

What is it good for?

Swap spaces for underscores, hyphens, plus signs or nothing at all. It saves you the tedious retyping that comes with doing this by hand.

It works on whatever you paste, line by line where that makes sense, and it handles non-English text properly, because it works with Unicode and not just plain English letters. People most often reach for it when rewriting a heading that was typed in the wrong case, preparing a list of names, IDs or emails for a spreadsheet and writing captions and bios for social media.

See it in action

Here is a quick example so you can see what to expect.

You typemy new file name another example here
You getmy_new_file_name another_example_here
Good to know. Underscores suit file names and variables, while hyphens are better for URLs.

Tips for better results

It works on the exact text you paste, so check the first few lines of the result before you copy the whole thing. That catches a wrong option early, while it is cheap to fix.

If the result is not what you expected, look at the options above the box. A single setting, such as case sensitivity or the separator, often explains it.

For a repeated job, keep the tool open in a tab. You can paste a new text over the old one and the output refreshes straight away.

Privacy

Everything you paste is processed by JavaScript in your own browser. It is not uploaded, logged or stored on our servers, so it is fine for private lists and drafts.

Frequently asked questions

Is Replace Spaces with Underscores or Hyphens free to use?

Yes, completely free. There is no sign-up, no watermark and no limit on how many times you use it.

Is my data safe when I use Replace Spaces with Underscores or Hyphens?

Your text is processed in your browser by JavaScript. It is not sent to our servers, so it stays private.

Does Replace Spaces with Underscores or Hyphens work on my phone?

Yes. The layout adapts to small screens, and the tool works in current versions of Chrome, Edge, Firefox and Safari.

Any tips for using Replace Spaces with Underscores or Hyphens?

Underscores suit file names and variables, while hyphens are better for URLs.