Free Filename Sanitizer

Strip unsafe characters from filenames — spaces, slashes, quotes, emoji and accented letters — so your files work on Windows, macOS, Linux, web servers and FTP without surprises. 100% private: nothing uploads.

  • Files stay on your device
  • Cross-platform safe output
  • Free, no signup
  • Downloads as ZIP
Drop files here or click to choose · up to 200 files
0 files

No files added yet.

Drop files into the bar above to start.

Processing happens entirely in your browser. Nothing is uploaded.

What characters are unsafe in filenames?

Different operating systems and protocols disagree on what's allowed in a filename. Here's a quick reference:

Windows blocks

  • < > : " / \ | ? *
  • Control characters (0–31)
  • Reserved names: CON, PRN, AUX, NUL, COM1–9, LPT1–9
  • Trailing dots and spaces

macOS / Linux block

  • / (path separator) — universally banned
  • Null byte \0
  • macOS quietly normalises Unicode to NFD, which can confuse cross-platform tools

URLs and the web

  • Spaces become %20
  • Quotes, brackets, ampersand and percent need encoding
  • Non-ASCII triggers Punycode/IDNA paths
  • Some servers reject percent-encoded slashes outright

Tooling pitfalls

  • Shell scripts choke on spaces, quotes, backticks
  • FTP and SFTP clients mangle Unicode
  • CI/CD pipelines silently fail on emoji filenames
  • Email attachment scanners may quarantine unusual names

Recommended filename rules

If you want filenames that work everywhere — Windows, macOS, Linux, S3, GitHub, FTP, email — follow this checklist:

1. Use only ASCII letters, digits, dot, hyphen and underscore

The safest character set is [A-Za-z0-9._-]. Every modern OS, web server and protocol handles these without needing to escape or encode anything. Enable Strict mode above for this.

2. Replace spaces with underscore or dash

Spaces are legal but cause more pain than they're worth: shell scripts need quoting, URLs need %20, and many old tools split filenames at spaces. Convention: dashes for human-readable names, underscores for code-like names.

3. Lowercase whenever possible

Linux file systems are case-sensitive (Photo.jpg ≠ photo.jpg); Windows isn't. Mixing cases breaks cross-platform builds, version control and Docker mounts. Pick lowercase and stick to it.

4. Cap length around 64 characters

Most file systems allow 255 bytes per name, but long filenames break: Windows path limits (260 chars including the path), email subject-line constraints, certain ZIP tools, and old SFTP clients. 64 chars (before extension) is a defensive default.

5. Strip emoji and exotic Unicode

Emoji in filenames look fun but break: GitHub issues with bot integrations, CI systems with older Java/Python, and any pipeline that round-trips through ASCII. Save emoji for tags and descriptions, not filenames.

Frequently asked questions

Is the filename sanitizer really free?

Yes — completely free, no signup, unlimited use.

Are my files uploaded?

No. The tool runs entirely in your browser. Your files are read locally; only the renamed copies are zipped and downloaded.

Will the file content change?

No. Only the filename inside the ZIP is changed. The bytes of each file are byte-identical to the original.

What's the difference between this and the Bulk File Renamer?

The Bulk Renamer is general-purpose (find & replace, prefixes, regex, sequencing). This Sanitizer is purpose-built for cross-platform safety with sensible defaults — drop files, click download, done.

What's "transliterate to ASCII"?

Strips accents and normalises non-Latin characters to their nearest ASCII equivalent. Examples: cafécafe, naïvenaive, résuméresume. Useful when targeting old systems that don't speak Unicode.

Need to sanitize filenames across an entire drive?

FilesDesk handles whole folder trees, preserves paths, and combines sanitization with AI-powered renaming based on file content.

Try FilesDesk free