Writing clean URL slugs
A slug is the readable part of a web address that names a page, such as how-to-bake-bread in example.com/blog/how-to-bake-bread. Good slugs tell people and search engines what a page is about before they click, they survive being copied into emails and chat apps, and they never change once published.
This generator turns any title into a slug as you type. It lowercases the text, replaces accented letters with plain ones, removes symbols, joins words with hyphens or underscores and can cut the result to a maximum length on a word boundary.
How to use it
- Type or paste the page title.
- Choose the separator. Hyphens are the standard for URLs; underscores suit file names and some identifiers.
- Keep Lowercase and Strip accents switched on for web addresses.
- Set a maximum length if your system needs one, then copy the slug.
Example: a blog post title
10 Tips for Café Owners — 2026 Edition!
10-tips-for-cafe-owners-2026-edition
The accent on Café is dropped, the dash and exclamation mark disappear, and every run of spaces becomes a single hyphen.
What makes a good slug
Keep it short and descriptive: three to six words that match what people search for. Google's own guidance recommends simple, readable URLs with words rather than ID numbers, and hyphens rather than underscores, because hyphens are read as spaces between words.
Lowercase avoids duplicate addresses: on many servers /About and /about are different pages. Leaving out words like a, the and of is optional; keep them if the slug reads better with them.
Accents and other alphabets
Accented letters are converted to their base letter, so é becomes e, ü becomes u, and special letters are spelled out: ß becomes ss, æ becomes ae and ł becomes l. Browsers can show non-ASCII characters in URLs, but they are sent percent-encoded and often turn into unreadable strings like %C3%A9 when copied. Letters from scripts such as Arabic, Chinese or Cyrillic are removed by this tool, so for those languages write a short slug in Latin letters by hand.
Never change a published slug
Links from other sites, bookmarks and search results all point at the old address. If you must change a slug, set up a permanent 301 redirect from the old URL to the new one, so visitors and search rankings follow. That is also why dates in slugs are risky: a post called best-laptops-2025 looks out of date next year.
Questions
Hyphen or underscore?
Hyphens for URLs. Search engines treat a hyphen as a word separator, while an underscore can join two words into one.
How long should a slug be?
There is no hard limit, but short slugs are easier to share and display in full in search results. Around 60 characters is a sensible maximum.
Why did the max length cut my last word?
The cut happens at the character limit and a trailing separator is removed. Raise the limit or shorten the title if the last word matters.