Slug Generator

Paste a headline and get the URL version of it. Accented letters are folded to their base, symbols that cannot live in a path are spelled out, and everything else becomes lowercase words joined by hyphens.

Separator

Runs entirely in your browser. Your files are never uploaded.

How to use Slug Generator

  1. 1Paste or type your title.
  2. 2Pick a hyphen or an underscore as the separator.
  3. 3Drop the small words or set a length limit if the slug is long.
  4. 4Copy the slug into your CMS.

What a slug has to survive

A slug ends up in a link, in an email, in a spreadsheet and sometimes read out loud. That rules out spaces, capitals, punctuation and anything a browser would re-encode into percent signs.

What is left is lowercase letters, digits and a single separator, which is why every slug looks the same whatever language the title was written in.

Accents, ß and the rupee sign

Accented Latin letters are folded to their base letter, so Crème Brûlée becomes creme-brulee. A few letters have no accent to remove and are mapped by hand: ß becomes ss, æ becomes ae, ø becomes o.

Symbols that carry meaning get spelled out rather than dropped, because dropping them changes the title. An ampersand becomes and, a per cent sign becomes percent, and currency marks become their three-letter codes, so ₹500 plan comes out as inr-500-plan.

Length and the small words

Removing stop words turns "the best way to compress a pdf" into best-way-compress-pdf. Shorter slugs are easier to read in a search result and easier to paste into a message without wrapping.

A length limit cuts at a whole word, never mid-word, so the slug still reads as words. If a single word is longer than the limit on its own, it gets cut rather than dropped, since an empty slug is no use to anyone.

Limits

  • Scripts with no Latin equivalent cannot be folded, so a Hindi or Chinese title produces no slug. The tool says so rather than handing you an empty box.
  • Transliteration is not attempted. Folding an accent is reliable; spelling out a Cyrillic or Greek word is a judgement call a tool should not make silently.
  • Uniqueness is your CMS's job. Two titles that differ only in punctuation give the same slug.

Frequently asked questions

Should a slug use hyphens or underscores?
Hyphens. Search engines treat a hyphen as a word separator and an underscore as part of the word, so keyword-rich is read as two words and keyword_rich as one. Underscores are here for systems that require them.
How long should a slug be?
Short enough to read in a search result, which in practice means three to six words. There is no ranking penalty for a long slug, but a link nobody can read gets clicked less.
Why does my Hindi title give an empty slug?
Because Devanagari has no Latin equivalent to fold to, and guessing at a transliteration would produce a URL that is wrong in a way you could not easily see. Write the slug in English alongside the Hindi title instead.
Can I keep the capital letters?
There is an option for it, though mixed-case URLs are worth avoiding. Some servers treat /About and /about as two pages, which splits the traffic and the ranking signals between them.