URL Slug Generator

Turn any title into a clean URL slug, ready for a blog post, product page or file name.

yoursite.com/10-tips-for-better-sleep-what-science-says-2027-edition
55 characters

Last reviewed:

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.

TitleSlug
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 Recipecreme-brulee-recipe
Salt & Pepper Shrimpsalt-and-pepper-shrimp
Don't Panic: A Beginner's Guidedont-panic-a-beginners-guide
C++ vs. Pythonc-vs-python
Straße in Münchenstrasse-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

  1. Title: The Complete Beginner's Guide to Growing Tomatoes in Containers on a Small Balcony
  2. Full slug: 81 characters
  3. With a 60-character limit: the-complete-beginners-guide-to-growing-tomatoes-in (51 characters)
  4. 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.

PageGenerated slugHand-edited slug
Blog post: How to Make Cold Brew Coffee at Homehow-to-make-cold-brew-coffee-at-homecold-brew-coffee
Product: Men's Waterproof Hiking Boots, Size 10mens-waterproof-hiking-boots-size-10mens-waterproof-hiking-boots
Event: Spring Open House at Maple Street Schoolspring-open-house-at-maple-street-schoolspring-open-house
Category: Kids & Teenskids-and-teenskids-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

ProblemWhat happensFix
SpacesShown as %20 in the addressUse hyphens
Capital lettersThe path can be case-sensitive, so /Recipes and /recipes may be different pagesLowercase everything
Accented or non-Latin lettersAllowed, but encoded behind the scenes: é becomes %C3%A9 when copiedRemove accents for addresses shared widely
? # & =Reserved for search parameters and page sectionsRemove 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.

Sources and further reading

How to use it

  1. 1Type or paste a title.
  2. 2Choose a separator and maximum length.
  3. 3Copy the slug.

Questions

Hyphens or underscores?

Google treats hyphens as word separators, so hyphens are the best choice for URLs.

Is my text uploaded anywhere?

No. Everything happens in your browser; your text never leaves your device.

Also handy: QR Code Generator, Text to QR Code, Shuffle a List