Filename Sanitizer

Remove or replace characters that Windows does not allow in a file name, and fix reserved Windows names and names that are too long. The result is safe to use for saving or uploading files.

1 Fill in the boxes

2 Your answer

Your answer shows here as you type.

How to use the Filename Sanitizer

  1. Type or paste the file name you want to check.
  2. Choose what to replace each invalid character with.
  3. Copy the sanitized file name from the result.

Frequently asked questions

Which characters are not allowed in Windows file names?

Windows does not allow these characters in file names: < > : " / \ | ? * and control characters with codes 0 to 31. macOS disallows colon and slash, and Linux disallows slash and the null character.

What are reserved file names on Windows?

CON, PRN, AUX, NUL, COM1 to COM9, and LPT1 to LPT9 are reserved. They are not allowed as file names even with an extension, so this tool adds an underscore in front of them.

What is the maximum length of a file name?

Most file systems, including NTFS, allow 255 characters per file name. The full path on Windows is limited to 260 characters unless long paths are enabled.

Can a file name end with a dot or a space?

Windows removes trailing dots and spaces from file names, so this tool removes them as well.

Wrote something with AI? Slop Monkey rewrites it so it sounds like you, and keeps your facts.