Slugify

Convert text to URL-friendly slugs.

Paste a title or phrase and get a lowercase, hyphen-separated, ASCII-only slug ready to use as a URL path, filename, or identifier. Accented characters get transliterated to their base letter; non-Latin scripts are converted where possible.

Common use cases: generating blog post URLs from titles, creating clean filenames from human-readable names, building anchor IDs from headings, and producing identifiers from user-supplied text for use in URLs or filesystems.

Text

Slug

Frequently asked questions

What makes a good URL slug?
Short, lowercase, hyphen-separated, ASCII-only. my-blog-post not My_Blog_Post.html. Hyphens (not underscores) because search engines treat hyphens as word separators. ASCII because non-Latin characters get percent-encoded in URLs and become unreadable.
How are accented characters and non-Latin scripts handled?
Accents are stripped to their base letter (ñn, üu) so the slug stays readable. Cyrillic, CJK, Arabic and other scripts are transliterated to Latin when a reasonable mapping exists, or dropped otherwise.
Should I include stop words like "the" and "a"?
Modern search engines aren't hurt by them, so don't strip them automatically — sometimes they're important for meaning. a-history-of-violence and history-of-violence are different things.
What about emojis and symbols?
They're dropped from slugs because URL-encoded emojis (%F0%9F%98%80) are unreadable and break in many contexts. If you really need a symbol in a URL, spell it out as a word.