File Name Cleaner
Sanitize a file name or a list of file names by stripping invalid characters, replacing spaces, trimming stray dots/spaces, and optionally lowercasing.
Cleaned File Name(s)
My-Report-(Final)!.docx
How to Use the File Name Cleaner
Paste a messy file name, or a list of them one per line, and the tool sanitizes each one: it strips out characters that cause problems across common operating systems (< > : " / \ | ? *), replaces spaces with a hyphen or underscore (your choice via the toggle), and trims any leading or trailing dots and spaces. Turn on "Lowercase everything" if you also want fully lowercase output.
Example
My Report (Final)!?.docx cleans to My-Reports-Final.docx with the hyphen separator, or my_report_final.docx with underscore and lowercase both turned on.
Common Use Cases
- Sanitizing file names before uploading them to a system that rejects special characters.
- Cleaning up a batch of downloaded file names that contain spaces and punctuation.
- Standardizing file naming to a consistent hyphen or underscore style across a project.
FAQs
- Which characters get removed? The characters that are invalid or problematic on common operating systems:
< > : " / \ | ? *. These are stripped out entirely rather than replaced, since there's no universally safe substitute for most of them. - Does this rename the actual file? No — this tool only generates a cleaned version of the text you provide; you still need to rename the actual file yourself using the cleaned name it outputs.
- What happens to the file extension? The extension is treated as part of the name and cleaned the same way as the rest — if you use the lowercase toggle, the extension is lowercased too, which is usually desirable for consistency.
