How to sanitize file names
Select files, choose the naming rules, review the proposed names, and download renamed copies. The tool processes the selected files in your browser. It does not rename, move, delete, or modify the original files.
- Click browse files and select one or more files.
- Choose the filename rules for the selected files.
- Review the mapping table, then use Add more files or Clear all if needed.
- Download the result with Download renamed copy or Download ZIP + manifest.
Review the proposed names
The table shows each original name or path beside its proposed name or path. Changing an option recomputes the mapping live.
Status values can include Unchanged, Renamed, Collision resolved, Reserved name fixed, and Truncated. Review these rows before downloading.
Choose the filename rules
- Character policy replaces unsafe characters. Strict ASCII portable keeps letters, digits, periods, underscores, and hyphens. Control characters from
U+0000-U+001FandU+007Fare removed. - Unicode normalization can be set to None, NFC (compose), or NFKC (compatibility compose).
- Transliterate accented/foreign letters to ASCII removes combining accents and converts specific mapped characters where supported. For example,
cafécan becomecafeandBjörkcan becomeBjork. Other characters follow the selected character policy. - Case style can keep the original case, force lowercase or uppercase, or use kebab-case or snake_case. The last two options lowercase text and force
-or_; they do not convert every period. - Separator for unsafe characters controls replacement with a hyphen, underscore, or no separator. It is disabled when kebab-case or snake_case is selected.
- Max basename length (characters) is enforced against the resulting cleaned base plus preserved extension. A long extension therefore uses part of the configured length.
- Preserve the final extension keeps the final dot-segment or recognized compound suffix such as
.tar.gz,.min.js,.d.ts, or.spec.ts. Turn it off to sanitize the whole filename as one unit. - Reserved base names such as
CON,PRN,AUX,NUL,COM0-COM9, andLPT0-LPT9receive an underscore. - If names collide after sanitization, the selected Collision suffix policy adds parentheses, a dash, or an underscore suffix, such as
name (2).ext,name-2.ext, orname_2.ext.
Download renamed files and manifests
For one selected file, use Download renamed copy. For two or more files, use Download ZIP + manifest to create a .zip containing the renamed files and both manifest.csv and manifest.json. To export only the mapping, use Manifest CSV or Manifest JSON. If ZIP generation fails, the page displays an error message.
Folder paths and current limitations
The current interface does not expose a folder picker. If a browser file list supplies a folder-relative path through webkitRelativePath, the script keeps that path in the mapping and sanitizes its folder segments.
Files are read in the browser and ZIP output is built there. The implementation defines no numeric file-count or data-size limit, but large selections may be constrained by browser or device resources. The policy cannot guarantee compatibility with every filesystem, so check the destination's rules for edge cases.
Frequently asked questions
Does this rename my original files?
No. This tool never touches the files on your device. It reads each selected file, computes a sanitized name, and gives you a renamed copy to download - either a single file or a ZIP archive - while your originals stay exactly where they are, untouched.
Is the sanitized filename guaranteed to work on every filesystem?
No tool can make that guarantee. Filesystems and services differ (case sensitivity, exact length limits, additional reserved names, byte vs. character counting). This tool applies a documented, configurable policy aimed at broad portability across Windows, macOS, Linux, and most cloud storage and web upload systems, but you should still check any destination's specific rules for edge cases.
What counts as a compound extension?
By default only the final dot-segment of a filename is treated as its extension. An exception list of known two-part extensions - such as .tar.gz, .tar.bz2, .min.js, .d.ts, and .spec.ts - is checked first; if the last two dot-segments match one of those, both are kept together as the extension. Everything else uses just the final segment.
How are naming collisions handled?
If two or more selected files sanitize to the same name, this tool automatically appends a numbered suffix to every file after the first, using whichever suffix style you selected - parentheses like "(2)", a dash like "-2", or an underscore like "_2". The mapping table shows exactly which files were affected.
Does it remove duplicate files or strip metadata?
No. This tool only proposes sanitized file names - it doesn't detect or remove duplicate files, and it doesn't touch EXIF data or any other file metadata. Use Duplicate File Finder or a dedicated metadata remover for those tasks.
Does it upload my files anywhere?
No. Files are read, renamed, and (when needed) zipped entirely in your browser using the File API and JSZip. Nothing is sent to a server.