Slug Generator
Turn any title or string into a clean, URL-safe slug.
—The Slug Generator converts any title, heading, or string into a clean, URL-safe slug. It lowercases the text, strips accents and punctuation, and joins the words with a hyphen or underscore — exactly what you want for a blog URL, a filename, or an anchor id. Everything runs locally in your browser.
- ✓Handles accents and Unicode by transliterating to ASCII
- ✓Collapses spaces and repeated separators automatically
- ✓Choose hyphen or underscore, and toggle lowercase
- ✓100% private — nothing is uploaded
What Makes a Good Slug
A slug is the human-readable part of a URL — the my-blog-post in /blog/my-blog-post. Good slugs are lowercase, use hyphens between words, contain only letters, numbers and hyphens, and drop stop-words and punctuation. This tool applies those rules for you so your URLs stay clean, readable, and stable.
Before and After
| Input | Slug |
|---|---|
| Hello, World! This Is My Post | hello-world-this-is-my-post |
| Café société — 10% off! | cafe-societe-10-off |
| Extra Spaces Everywhere | extra-spaces-everywhere |
| Already-a-slug | already-a-slug |
Why Slugs Matter for SEO
Search engines use the words in a URL as a ranking signal, and a clean, readable slug like /blog/json-vs-yaml tells both users and crawlers what the page is about before they even click. A slug full of numbers, session IDs, or unencoded special characters (/blog/post?id=8271&ref=%20x) carries none of that signal and looks untrustworthy in search results. Keeping slugs short, lowercase, and hyphenated is a small, low-effort SEO habit that pays off on every page you publish.
Where Slugs Are Used
- ▸Blog and CMS URLs — Generate the URL path from a post title so links are readable and SEO-friendly.
- ▸File and asset names — Turn a label into a safe filename with no spaces or special characters.
- ▸Anchor and element ids — Create stable id attributes for headings and in-page anchor links.
- ▸API resource keys — Derive a predictable, URL-safe identifier from a display name.
- ▸Git branch names — Turn a ticket title into a clean, valid branch name with no spaces or special characters.