Make a Linux-safe filename

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

Linux is the most permissive of all: the only characters it truly forbids in a filename are the forward slash / and the null byte. Paste a name below and the Linux profile removes the slash and strips a leading dash, which otherwise makes command-line tools treat the file as an option.

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

The rules, in plain terms

What Linux forbids

Only the forward slash / and the null byte are illegal. Everything else, including spaces and symbols, is technically allowed.

A leading dash bites

A file called -rf or --help is read as a flag by CLI tools. The profile strips leading dashes so the name is safe to script.

Case matters

Linux filesystems are case-sensitive, so File.txt and file.txt are two different files. Pick one convention and stick to it.

The Windows app

Put it on a hotkey

☕ Filenames that never trip up a shell or a script, on a hotkey for the price of a coffee. Yours forever.

Download this exact setup as a ready-made Filename-safe (Linux) 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 Linux filename?

Only two: the forward slash /, which separates directories, and the null byte. Every other character, including spaces, is technically legal, which is exactly why unclean names cause so much trouble in scripts.

If Linux allows almost anything, why clean the name?

Because the shell does not. Spaces and characters like * ? [ ] ( ) & ; | < > have special meaning on the command line, so a legal-but-messy name needs constant quoting and breaks pipelines, scp and rsync.

Why does a filename starting with a dash cause errors?

Command-line tools read a leading dash as the start of an option, so rm -file tries to parse -file as flags. The profile removes leading dashes to keep names safe to use in scripts.

Do you have a stricter, script-safe option?

Yes. The SSH / shell-safe profile keeps only letters, digits, dot, underscore and hyphen, which is the portable set that never needs quoting over scp, rsync or in URLs.

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.