What makes a good URL slug
A slug is the readable end of a web address: in example.com/blog/creme-brulee-recipe, the slug is creme-brulee-recipe. A good one is short, lowercase, uses hyphens between words, and tells a person what the page is about before they click.
- Keep the words that describe the page and drop the rest. Three to five words is a sensible rule of thumb.
- Leave out dates and years on pages you'll update, so the address never looks stale.
- Use the words people search for: “sourdough-starter” beats “my-bread-journey-part-2”.
- Decide once and keep it. Changing a published slug breaks links (more on that below).
The slug also travels with the link. When someone pastes it into a chat, an email or a printed handout, a readable slug tells people what they're about to open, and a string like “p=48213” tells them nothing.
How titles become slugs
The generator lowercases the title, removes accents (é becomes e, ñ becomes n), turns & into “and”, drops apostrophes so “don't” becomes “dont”, and replaces every other symbol or space with a single separator. Letters that aren't simply accented versions of a to z get their usual spelling in plain letters: ß becomes ss, æ becomes ae, ø becomes o and ł becomes l.
| Title | Slug |
|---|---|
| 10 Tips for Better Sleep: What Science Says (2027 Edition) | 10-tips-for-better-sleep-what-science-says-2027-edition |
| Crème Brûlée Recipe | creme-brulee-recipe |
| Salt & Pepper Shrimp | salt-and-pepper-shrimp |
| Don't Panic: A Beginner's Guide | dont-panic-a-beginners-guide |
| C++ vs. Python | c-vs-python |
| Straße in München | strasse-in-munchen |
The C++ row shows why you should glance at every result: symbols vanish, so “c-vs-python” lost its meaning. Something like “cpp-vs-python” is clearer, and you can simply type it in.
Trimming long titles
The maximum length cuts the slug back to the last complete word that fits, so you never end up with half a word. A mechanical cut can still end awkwardly, though, and a hand-picked slug is usually better.
Example: A long gardening headline
- Title: The Complete Beginner's Guide to Growing Tomatoes in Containers on a Small Balcony
- Full slug: 81 characters
- With a 60-character limit: the-complete-beginners-guide-to-growing-tomatoes-in (51 characters)
- Hand-picked: growing-tomatoes-in-containers (30 characters)
The automatic version ends on “in”. The hand-picked one keeps the words a reader would actually search for.
Keep or drop small words like a, the and of
The generator keeps every word, including “a”, “the” and “of”. Dropping them makes slugs shorter, and many sites do. But small words sometimes carry meaning: “the-who-live” is a band's concert, “who-live” is nonsense, and “how-to-tie-a-tie” reads better than “tie-tie”. Decide by reading the slug aloud.
| Page | Generated slug | Hand-edited slug |
|---|---|---|
| Blog post: How to Make Cold Brew Coffee at Home | how-to-make-cold-brew-coffee-at-home | cold-brew-coffee |
| Product: Men's Waterproof Hiking Boots, Size 10 | mens-waterproof-hiking-boots-size-10 | mens-waterproof-hiking-boots |
| Event: Spring Open House at Maple Street School | spring-open-house-at-maple-street-school | spring-open-house |
| Category: Kids & Teens | kids-and-teens | kids-and-teens |
Notice the product row. Sizes, colors and other options usually belong in the page, not the address, so one page can serve every size. The event row drops the school name because the site already belongs to the school.
Changing a slug after publishing
Once a page is live, its address spreads into bookmarks, social posts, emails and printed flyers. Change the slug and every one of those links leads to an error page. The W3C's long-standing advice is blunt: good addresses don't change.
If you must rename a page, set up a permanent redirect (an HTTP 301) from the old address to the new one, so visitors and search engines follow along. This is also why dates in slugs cause trouble: “best-laptops-2026” forces a choice between an outdated address and a broken link.
Printing a QR code for the link? Settle the slug first. A printed code can't follow a renamed page unless you add a redirect, and a short slug also makes a simpler, easier-to-scan code.
Capitals, spaces and symbols in web addresses
| Problem | What happens | Fix |
|---|---|---|
| Spaces | Shown as %20 in the address | Use hyphens |
| Capital letters | The path can be case-sensitive, so /Recipes and /recipes may be different pages | Lowercase everything |
| Accented or non-Latin letters | Allowed, but encoded behind the scenes: é becomes %C3%A9 when copied | Remove accents for addresses shared widely |
| ? # & = | Reserved for search parameters and page sections | Remove them or spell out & as and |
Slugs work well for file names too: “team-photo-final-v2” is easier to share than “Team Photo (FINAL) v2”. Slug the name part and add the extension yourself, since the dot would otherwise become a hyphen. To keep capitals for code, try the Case Converter, and check length with the Character Counter.