Filename Character Replacer

Replace Dashes, Underscores and Dots in Filenames

Paste one or many filenames and instantly replace dashes, underscores, dots, spaces or any other character. File extensions — including compound ones like .tar.gz — stay intact.

Privacy: your text is processed locally in your browser. Nothing is uploaded, logged, or saved.

How to use it

  1. Paste a filename or a list of filenames (one per line) into the input.
  2. Pick a character to Replace and a character to replace it With — or tap a preset.
  3. Optionally toggle extension preservation, repeated-separator collapsing, or capitalization.
  4. Copy the cleaned result and paste it wherever you rename your files.

Examples

Dashes to spaces

summer-vacation-photos.jpgsummer vacation photos.jpg

Underscores to spaces

project_final_version.pdfproject final version.pdf

Dots to spaces (extension preserved)

show.name.episode.01.mkvshow name episode 01.mkv

Spaces to dashes

my new article title.txtmy-new-article-title.txt

Remove a character

invoice__final__copy.pdfinvoicefinalcopy.pdf

Compound extension

archive.backup.tar.gzarchive backup.tar.gz

About this tool

The Filename Character Replacer is a fast, browser-only utility for cleaning up messy filenames — the kind you get from downloads, media libraries, or exports where words are stuck together with hyphens, underscores, or dots. Paste anything from a single filename to a whole list, choose which characters to swap, and copy the result.

Unlike a plain find-and-replace, this tool understands filenames. It preserves file extensions (including compound ones like .tar.gz), leaves directory separators alone unless you ask, treats every match as literal text (no accidental regex surprises), and keeps Unicode, accented characters, and emoji intact.

Frequently asked questions about Filename Character Replacer

Updated

How do I replace dashes with spaces in a filename?
Paste the filename above, click the “Dashes to spaces” preset (or set Replace to Hyphen and With to Space). The clean result appears instantly and you can copy it with one click.
Is a dash the same as a hyphen?
On a keyboard, yes — the key labeled “-” produces a hyphen-minus (U+002D), which most people call a dash. True en dashes (–) and em dashes (—) are different characters; this tool has separate options for each so you can target them precisely.
How do I replace underscores with spaces?
Use the “Underscores to spaces” preset, or set Replace to Underscore and With to Space. Every underscore in every pasted line is swapped for a single space.
How do I replace dots or periods without removing the file extension?
Keep the default “Preserve file extension” option on. The final .ext (or compound extensions like .tar.gz) is protected, so only the periods inside the filename body are replaced.
Can I process several filenames at once?
Yes. Paste one filename per line — the tool processes each line independently, keeps blank lines in place, and returns the whole batch in the result field.
Can I remove a character instead of replacing it?
Yes. In the With dropdown pick “Nothing — remove it” and every match will be deleted rather than swapped.
Does this tool rename files on my computer?
No. Browsers cannot rename files on your disk. This tool cleans the pasted filename text so you can copy it back into your file manager, spreadsheet, or rename tool of choice.
Is my pasted text uploaded or stored?
No. Everything runs locally in your browser. Nothing is uploaded, logged, or saved between visits.
Can I convert spaces to dashes or underscores?
Yes — use the “Spaces to dashes” or “Spaces to underscores” presets, or set Replace to Space and With to whichever character you need.
Can I use a custom character?
Yes. Pick “Custom text or character” in either dropdown to type any literal string, including multi-character replacements. The input is treated literally, never as a regular expression.
What is the difference between a hyphen, en dash, and em dash?
The hyphen (-) is the standard keyboard character used inside filenames and compound words. The en dash (–) is slightly longer and is used for ranges. The em dash (—) is longer still and used as punctuation. Copy-pasting from Word or the web often introduces en and em dashes by accident — this tool lets you replace them explicitly.
Will the tool preserve .tar.gz and other compound extensions?
Yes. Compound extensions such as .tar.gz, .tar.bz2, .tar.xz, and .tar.zst are detected (in any case) and kept intact when extension preservation is on.
Can I clean Windows or Unix file paths?
Yes. Directory separators (\ and /) are left alone unless you explicitly select them in the Replace dropdown. When extension preservation is on, only the filename portion after the last separator is cleaned.

Privacy

Everything runs locally in your browser. Your input is never uploaded, logged, or stored.