Skip to content

How to write a URL slug: turn a title into a clean web address

Published

Open Slug generator

A slug is the readable last part of a web address, such as chocolate-chip-cookies in example.com/recipes/chocolate-chip-cookies. Paste your title into the slug generator and it lowercases the words, turns accents into plain letters, drops symbols and joins the words with hyphens, ready to copy.

Steps

  1. Open the slug generator and paste a title into Title or text. For several pages at once, put one title on each line.
  2. Read the Slug box. It updates as you type; with several lines it shows one slug per line and the label changes to Slugs with a count.
  3. Adjust the options if your site needs something other than the defaults:
    • Separator: Hyphen - (default), Under _ or Dot .
    • Letter case: lowercase (default) or Keep case
    • Characters: a-z only (default) or Any script
    • Maximum length: None, 40, 60 or 80 characters, cut at the last whole word that fits
  4. Press Copy, or Copy all for a list.

What happens to a title

Take Café crème brûlée: a 10-minute recipe:

Step Result
Accents fold to plain letters Cafe creme brulee: a 10-minute recipe
Lower case cafe creme brulee: a 10-minute recipe
Symbols and spaces separate words cafe creme brulee a 10 minute recipe
Joined with hyphens cafe-creme-brulee-a-10-minute-recipe

A few more rules are applied along the way:

  • & becomes the word and, so Salt & Pepper gives salt-and-pepper.
  • Apostrophes inside a word are removed, so Don't Panic gives dont-panic, not don-t-panic.
  • Letters that do not split into a base letter and an accent are spelled out: ß becomes ss, æ becomes ae, ø becomes o, ł becomes l.

Rules for a slug that holds up

  • Keep it short. Three to six meaningful words is plenty. A long slug gets cut off in search results and is hard to share.
  • Lead with the topic. chocolate-chip-cookies says more than my-favourite-weekend-baking-project.
  • Drop filler when it adds nothing. Words such as a, the, and, of can often go: history-of-the-bicycle reads fine as bicycle-history. The generator keeps every word, so trim by hand.
  • Use hyphens, lower case. Hyphens are the common word separator in web addresses, and lower case avoids two addresses that differ only by capitals.
  • Leave out dates and years unless the page is truly about that date. A slug with 2026 in it looks stale next year, and changing a slug later breaks links to it.
  • Do not change it after publishing without a redirect from the old address.

Choosing "a-z only" or "Any script"

a-z only keeps plain letters and digits, which every system accepts. Accented Latin letters always fold to their plain form, so French, Spanish, German or Polish titles convert cleanly.

Words in other scripts, such as Greek, Cyrillic, Chinese, Arabic or Hindi, have no plain a to z form, and this tool does not transliterate them. With a-z only they are removed; when that leaves nothing, the page says so. Choose Any script to keep them: 東京 guide gives 東京-guide. Modern browsers display such addresses fine, and many content systems accept them, but check yours first.

Other separators

  • Under _ gives cafe_creme_brulee, handy for file names or database keys.
  • Dot . gives cafe.creme.brulee, used by some package or logging names.

For variable names in code, such as camelCase or snake_case from a phrase, the case converter has the full set of code styles.

Questions

Is a slug the same as a URL?

No. The URL is the whole address; the slug is the part that names one page, usually at the end.

Does the maximum length cut a word in half?

No. It stops at the last whole word that fits. Only a single first word longer than the limit is cut.

Can I convert a whole list of titles?

Yes. Put one title on each line, and the slugs come out one per line in the same order. Blank lines are skipped.

Are my titles uploaded?

No. Slugs are made in your browser and the text stays on your device.

Slug generator

Turn a title into a clean URL slug.

Open Slug generator