File Name Cleaner
Clean filenames for safe use.
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
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?
Does it keep the extension?
Can it clean many names?
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 YouTubePDF, 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.