Slug Generator — Clean, URL-Safe Slugs
Turn any title into a tidy, URL-safe slug. Choose the separator, case, accent handling and a length cap — the result updates live, entirely in your browser. Nothing you type is sent anywhere.
Slug
—
0 chars ·
What is a URL slug?
A slug is the human-readable part of a URL that identifies a page —
the my-first-post in example.com/blog/my-first-post.
A good slug is lowercase, uses hyphens between words, contains only ASCII letters, numbers and
hyphens, and stays short. It makes links readable, shareable, and a little friendlier to search
engines than an opaque ?id=4815.
What this generator does
- Transliterates accents —
Crème Brûléebecomescreme-brulee, notcr-me-br-l-e. Most quick slugifiers just delete accented letters; this one folds them to their closest ASCII letter first. - Collapses punctuation and spaces into a single separator, then trims any leading or trailing separators.
- Caps the length at a word boundary — it won't leave you with a slug chopped off mid-word or ending in a stray hyphen.
- Lets you pick hyphen vs underscore and whether to lowercase.
Gotchas worth knowing
- Hyphens beat underscores for the web. Google treats a hyphen as a
word separator but an underscore as a word joiner —
two_wordscan be read as one token. Use hyphens for page URLs; underscores are more of a filename habit. - Slugs should be unique. Two posts titled "Hello World" produce the
same slug. Most systems append
-2or a short id to break the tie — this tool generates the base slug; your CMS handles collisions. - Don't change a published slug casually. The slug is part of the URL, so editing it breaks every existing link and bookmark unless you add a redirect.
- Stop words are a style choice, not a rule. Dropping
a / the / ofshortens a slug, but it's optional — keep them if it hurts readability. This tool leaves your words intact so you stay in control. - Non-Latin scripts. Stripping accents works for Latin-based languages. Text in scripts with no ASCII equivalent (e.g. CJK) will be removed by the URL-safe filter — for those, keep a manually chosen slug.
Frequently asked questions
Should a slug be lowercase?
Yes. URLs are case-sensitive after the domain, so /My-Post and
/my-post are two different pages to a server. Lowercasing avoids accidental
duplicates and is the near-universal convention.
How long should a slug be?
Short enough to read at a glance — roughly 3–6 words. There's no hard limit, but very long slugs get truncated in search results and are awkward to share. A 50–60 character cap is a sensible default.
Hyphen or underscore in a slug?
Hyphen, for anything that lives in a URL. Search engines split words on hyphens but not on underscores, so hyphens make each word individually findable.
Need other text utilities? Browse all tools on the home page.