Filename Cleaner
Sanitize file names for Windows, Mac, or Linux. Removes invalid characters, handles reserved names, and applies safe formatting rules.
My Document (Final v2)?.docx
My_Document_(Final_v2)_.docx
⚠ Removed characters invalid on all
COM1.txt
_COM1.txt
⚠ Prefixed reserved Windows device name
photo with spaces.jpg
photo___with___spaces.jpg
file/with\slashes.txt
file_with_slashes.txt
⚠ Removed characters invalid on all
Platform invalid character reference
Windows
\ / : * ? " < > |
+ control chars, reserved names (CON, NUL, COM1…)
macOS
/ :
Max 255 bytes (UTF-8)
Linux
/ (null byte)
Max 255 bytes; avoid spaces for CLI compatibility
Frequently Asked Questions
How do I clean up a file name?
Paste a file name and the tool removes characters that are invalid or risky on your chosen operating system, producing a safe, tidy name you can use for saving or uploading.
Which characters are not allowed in file names?
Windows forbids characters such as \ / : * ? " < > and |, and reserves names like CON and PRN. The cleaner strips or replaces these so the file name works across systems.
Does it handle Windows, Mac and Linux differences?
Yes. You can target Windows, macOS or Linux, and the tool applies that platform's specific rules for invalid characters and reserved names.
Why do clean file names matter?
Invalid characters can cause upload failures, broken links and errors when moving files between systems. A sanitised name avoids these problems and keeps URLs tidy.