URL Slug Generator

–
InputOutputRule
Café au laitcafe-au-laitAccents fold to their base letter
Rock & Rollrock-rollPunctuation becomes a hyphen - no and-expansion
My_Ultimate Guidemy-ultimate-guideUnderscores hyphenate like any punctuation - only letters, digits, hyphens survive
2026 Edition!2026-editionDigits stay; trailing punctuation is trimmed
Multiple spacesmultiple-spacesAny run of non-alphanumerics collapses to one hyphen
-trimmed-trimmedLeading and trailing hyphens are stripped
Ein schöner Tagein-schoner-tagNon-Latin scripts transliterate only if mapped; others drop
Lowercase · accents folded · hyphen-separated · trimmed to your spec below. RFC 3986 unreserved set: letters, digits, hyphen, dot, underscore, tilde.

Bottom line: a slug is the machine-readable tail of a URL - lowercase, hyphen-separated, accent-folded - and the hyphen matters more than it looks: search engines treat hyphens as word separators but underscores as letter-joiners, so my-page and my_page are different signals.

Paste a headline and get the URL slug a search engine would want: lowercase, spaces and punctuation converted to hyphens, accents folded to their plain equivalents (café → cafe), and no stray dashes. The slug is the part of the URL that humans and Google both read — 'my-ultimate-cold-brew-guide' beats '/post?id=4171' every time.

It also reports slug length, because best practice keeps slugs short: 3–5 meaningful words, under about 60 characters. Edit the input live and the slug updates as you type; everything runs in your browser.

How to use

  1. Paste or type your page title into the box.
  2. The clean slug appears instantly — accents folded, symbols stripped, words joined by hyphens.
  3. Check the length readout, copy the slug, and paste it into your CMS or router.

Frequently asked questions

What makes a good URL slug?

Lowercase, hyphens between words, no punctuation, no filler words like 'a' or 'the', and 3–6 words that describe the content. Keywords near the front help slightly; readability matters more.

Should slugs use hyphens or underscores?

Hyphens. Google treats hyphens as word separators but treats underscores as word joiners — 'cold-brew-guide' reads as three words, 'cold_brew_guide' reads as one.

Do accented characters hurt SEO?

Modern browsers handle them, but they turn into ugly percent-encoded strings when shared (caf%C3%A9). Folding accents to plain letters keeps URLs clean and shareable.

Can I change a slug after publishing?

Only with a redirect. Changing a published URL breaks any links pointing to it — set up a 301 redirect from the old slug to the new one, then update internal links.

How long should a URL slug be?

Short enough to read aloud and specific enough to be unique: three to five meaningful words is the sweet spot, with the keywords people would actually type - the full question belongs in the page title, not the address. Extremely long slugs get truncated in search results and shared links, and every stop word (the, and, of) is dead weight - my-guide-to-the-best-coffee says the same thing as best-coffee-guide with half the characters.

Do hyphens or underscores rank better in URL slugs?

Hyphens. Search engines treat a hyphen as a word separator and an underscore as a word joiner, so my-ultimate-guide reads as five words while my_ultimate-guide can read as one. That guidance has been consistent for over a decade, and it matches this tool's output: every run of non-alphanumeric characters - spaces, underscores, punctuation - collapses to a single hyphen, with accents folded to their base letters. The safe character set for a slug is the RFC 3986 unreserved set: letters, digits, hyphen, dot, underscore and tilde - and in practice, letters, digits and hyphens are all a slug ever needs.

Related tools