Safe Filename
Replace illegal filename characters; length, case, spaces.
Replaces < > : " / \ | ? * and controls. Optional replacement character, max length, lowercase, and space replacement. Unlike Slugify this can keep case and spaces. Unlike CSS Identifier Escape this is a filename, not a CSS ident. Empty names and . or .. fail.
What Safe Filename does
Replaces < > : " / \ | ? * and controls. Optional replacement character, max length, lowercase, and space replacement. Unlike Slugify this can keep case and spaces. Unlike CSS Identifier Escape this is a filename, not a CSS ident. Empty names and . or .. fail.
The interactive controls for Safe Filename load after this article so crawlers still read the instructions. Path /developer/filename-safe is the canonical address. Work happens on this device; Tool-You does not take a copy of the file or pasted text for Safe Filename.
How to use Safe Filename
- Keep this tab on Safe Filename (/developer/filename-safe). Pasting into the wrong Developer tool (for example Slugify) changes the job.
- Paste or type the input Safe Filename expects. Path hint: developer · filename safe. Replace illegal filename characters; length, case, spaces.
- Apply the Safe Filename action only. CSS Identifier Escape is a different transform (CSS-escape identifiers with escape count.). Replaces < > : " / \ | ? * and controls. Optional replacement character, max length, lowercase, and space replacement. Unlike Slugify this can keep case and spaces. Unlike CSS Identifier Escape this is a filename, not a CSS ident. Empty names and . or .. fail.
- Copy the output of Safe Filename if you need it elsewhere. Size/complexity still follows: Windows-illegal characters. Optional length cap 1–255. Empty, . and .. fail.
- If the text job is actually Turn text into a URL slug with separator and length options., leave Safe Filename and open Slugify.
When not to use Safe Filename
Skip Safe Filename when a neighbor tool matches better — start with Slugify or CSS Identifier Escape — or when the description already warns the job will fail. In the tool’s own words: Replaces < > : " / \ | ? * and controls. Optional replacement character, max length, lowercase, and space replacement. Unlike Slugify this can keep case and spaces. Unlike CSS Identifier Escape this is a filename, not a CSS ident. Empty names and . or .. fail.
Questions about Safe Filename
- What does Safe Filename do that other Developer pages on this site do not?
- Replaces < > : " / \ | ? * and controls. Optional replacement character, max length, lowercase, and space replacement. Unlike Slugify this can keep case and spaces. Unlike CSS Identifier Escape this is a filename, not a CSS ident. Empty names and . or .. fail. Short version: Replace illegal filename characters; length, case, spaces.
- Does Safe Filename upload my file or text to Tool-You servers?
- No. Safe Filename runs in this browser tab. Files stay on the device. Limit note: Windows-illegal characters. Optional length cap 1–255. Empty, . and .. fail.
- Should I use Slugify instead of Safe Filename?
- Use Safe Filename when you need Replace illegal filename characters; length, case, spaces. Use Slugify when you need Turn text into a URL slug with separator and length options. They share a category (Developer) but not the same job.
- What are the limits of Safe Filename?
- Windows-illegal characters. Optional length cap 1–255. Empty, . and .. fail. Also: Replaces < > : " / \ | ? * and controls. Optional replacement character, max length, lowercase, and space replacement. Unlike Slugify this can keep case and spaces. Unlike CSS Identifier Escape this is a filename, not a CSS ident. Empty names and . or .. fail.