Make a Windows-safe filename

100% local. Your text never leaves this browser tab.

Windows filenames can’t contain \ / : * ? " < > |, and can’t end in a space or period. Paste a name below: the Windows profile strips those characters, straightens smart quotes and tidies spaces, instantly and for free. This is also the safe cross-platform choice, since Windows is the strictest of the three desktop systems.

Cleaning a filename for a different system? Pick your target:
Windows macOS Linux SSH / shell-safe
What Windows-safe means

The rules, in plain terms

Characters Windows forbids

These nine are never allowed: \ / : * ? " < > |. The profile deletes each one.

Trailing dots and spaces

A name can’t end in a space or a period; Windows silently drops them and breaks the name. Both are trimmed for you.

Reserved names

Names like CON, PRN, AUX, NUL, COM1 and LPT1 are reserved by Windows, so rename the file if you hit one.

The Windows app

Put it on a hotkey

☕ Never hit “the file name is not valid” again: a valid name on a hotkey, for the price of a coffee. Yours forever.

Download this exact setup as a ready-made Filename-safe (Windows) profile. Give it a global hotkey in the Windows app and any name you copy is cleaned for this target the instant you paste, so a Windows machine can prepare files for a Mac, a Linux box or a server over SSH. Same engine as above, entirely offline.

Get the Windows app →
Pay once, €3.39, no subscription. If the app doesn’t open, the profile is saved to your downloads, just import it.
FAQ

Filenames, answered plainly

What characters are not allowed in a Windows filename?

Windows filenames cannot contain any of these nine characters: backslash \, forward slash /, colon :, asterisk *, question mark ?, double quote ", less-than <, greater-than >, or pipe |. A name also can’t end in a space or a period, and can’t be a reserved device name such as CON, PRN, AUX, NUL, COM1 to COM9 or LPT1 to LPT9.

How do I fix a "the file name is not valid" error?

Remove the illegal characters (\ / : * ? " < > |), delete any trailing space or period, and make sure the name isn’t a reserved word like CON or NUL. Paste the name into the tool above to strip them all at once.

What is the maximum length of a Windows filename?

A single filename can be up to 255 characters, though the full path was historically limited to 260 characters (MAX_PATH). Short, descriptive names avoid trouble in deep folders and when syncing to the cloud.

Is a Windows-safe filename also safe on Mac and Linux?

Yes. Windows has the strictest rules of the three desktop systems, so a name that is valid on Windows is valid on macOS and Linux too. That makes the Windows profile the safe cross-platform choice.

Cleaning for a different system? Use the tabs above, or head back to the Windows filename cleaner or the full tool on the home page.