File Name Cleaner

Clean filenames for safe use.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Type or paste a file name and press Process. Spaces and special characters become hyphens and everything is lowercased, giving a name that is safe for the web and the command line.

How to use

1
Step 1
Paste one file name.
2
Step 2
Press Process.
3
Step 3
Copy the cleaned name.

How it works

Every run of characters other than letters A to Z, digits, underscore, dot and hyphen is replaced by a single hyphen, repeated hyphens collapse to one, and the result is lowercased, so the extension is lowercased too. Accented letters are first reduced to their base letter (é becomes e), and leading or trailing hyphens are trimmed. Each line is cleaned as its own file name, so you can paste a list.

Worked example

A photo name with brackets

Input
My Holiday Photo (final) #2.JPG
Output
my-holiday-photo-final-2.jpg
Walkthrough
Spaces, brackets and the hash sign become single hyphens and the extension is lowercased.

Limitations

  • Only Latin accents are reduced to plain letters; other scripts (for example Arabic or Chinese) become hyphens and may leave nothing behind.
  • Does not rename files on your device; it only cleans the text.

Questions

How do I make a file name URL-safe?
Paste it and press Process to get lowercase text with hyphens.
Does it keep the extension?
Yes, the dot is kept and the extension is lowercased.
Can it clean many names?
Yes. Put one name per line and each line is cleaned separately.

Features

  • Lowercase and hyphenated
  • Extension kept
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • Inspect Network Activity - Chrome DevTools 101

    Chrome for Developers

    Downloading and uploading files is a network workflow.

    Watch on YouTube
  • PDF, What is it FOR?

    Computerphile

    File tools often sit next to document packet workflows.

    Watch on YouTube
  • Media Types

    IANA

    Official media-type registry for file extensions.

  • MIME types

    MDN

    Content types when converting or renaming downloads.