Slugify text for URLs and filenames
Turn a title into a URL-safe slug: lowercase, hyphen-separated, no messy punctuation. Optional mode keeps non-English letters for localized paths.
Output
—
Blog permalinks, S3 keys, and static site routes all expect predictable slug shapes. Doing it by hand invites typos.
ASCII mode strips accents (é → e) via Unicode normalization where possible.
How to slugify
- Paste a title or filename
- Choose lowercase / Unicode options
- Copy the slug into your CMS or code
Why use this
- Consistent hyphens instead of spaces and underscores mixed at random.
- Preview before publishing a post URL.
- Local — titles never leave the browser.
Scenarios
- Blog post permalink from the H1
- Safe download filename from a product title
- Static site route segment
Tips
- Prefer ASCII slugs for English sites; use Unicode when your stack and audience expect native characters.
- Keep slugs short — drop stop words in the title before pasting if needed.
Examples
| Input | Output | Note |
|---|---|---|
| Hello DeepConvert — 2026! | hello-deepconvert-2026 | — |
| 图片压缩指南 | (empty unless Unicode is on) | Enable Keep non-English letters |
Slugify FAQ
- Why did Chinese characters disappear?
- Default mode is ASCII-only for maximum URL safety. Turn on “Keep non-English letters” for localized slugs.
- Are slugs unique?
- No — two titles can collide. Your CMS still needs uniqueness checks.