Slug generator

Convert headlines, product names and file names into slugs that are safe in any URL.

Tier 0 · browser · unlimited
75 characters
Slugs
cafe-and-croissants-10-spots-in-sao-paulo
how-to-brew-coffee-2026-edition

What makes a good slug

A slug is the readable part of a URL that identifies a page: /blog/how-to-brew-coffee. Good slugs are lowercase, use hyphens between words, contain only letters and digits, and are short enough to read at a glance. Search engines show them in results, people share them, and changing them later breaks links, so it is worth getting them right the first time.

Accented letters are common in titles but awkward in URLs, where they turn into percent-encoded sequences like %C3%A7. This generator removes the accents (ç → c, ü → u) and spells out & as "and", so the slug stays readable everywhere.

Worked example

Café & Croissants: 10 Spots in São Paulo! becomes cafe-and-croissants-10-spots-in-sao-paulo. With a 30-character limit it is cut at a word boundary: cafe-and-croissants-10-spots.

Hyphens or underscores?

Google treats hyphens as word separators and underscores as joining words, so hyphens are the usual choice for URLs. Underscores suit file names and identifiers.

How this works

The page normalises the text with Unicode NFKD, which splits accented letters into a base letter and an accent mark, then removes the marks. Letters with no such split (ß, æ, ø, œ) are spelled out, & becomes "and", and the text is lowercased. Every run of anything other than a–z and 0–9 becomes a single separator, and separators at the start and end are removed. If you set a maximum length, the slug is cut at the last separator before the limit. Each line becomes its own slug. Everything runs in this tab.

Frequently asked

Should slugs contain stop words like the or and?

Optional. Short slugs are easier to read; remove filler words from the title if you like.

Why were Cyrillic or Chinese characters removed?

They have no ASCII form here. For those languages, write the slug in Latin transliteration yourself or keep Unicode URLs.

Hyphens or underscores?

Hyphens for URLs; search engines read them as spaces.

How long should a slug be?

Under about 60 characters is a common guideline; the limit option cuts at a word boundary.

Sources

Reviewed Oct 17, 2026 · test vectors fixtures/dev/slug-generator/