Skip to content

What Is a URL Slug? A Beginner’s Guide to Clean, Clickable Links

Look at this address: https://example.com/blog/what-is-a-url-slug. Everything after the domain name — what-is-a-url-slug — is the slug. It is the readable part of a web address, the part that tells a human what the page is about before they click it. Search engines read it too, and so does anyone deciding whether to share the link.

A good slug is short, lowercase, and joined with hyphens. A bad one is a string of numbers, a mess of percent signs, or a headline pasted in full with every capital letter and punctuation mark intact. The difference is small to write and big to read — and it is fully in your control, because you choose the slug when you publish the page.

Try it now: Slug Generator — type your title, get a clean, clickable slug. Free, no sign-up, runs in your browser.

Where slugs appear

Almost every page you publish has one: blog posts, guides, product pages, help articles, category pages. Most publishing platforms generate a slug automatically from the title, but automatic is not always clean. A title like “10 Best Tips for Better Sleep — A Beginner’s Guide (2026 Edition)!” can auto-generate into something long and punctuation-heavy. Checking the slug before you publish — and fixing it by hand when needed — is a thirty-second habit that makes every link you share look professional.

Good slugs vs bad slugs

Good slugBad version of the same pageWhy the good one wins
what-is-a-url-slugp=12345Words say what the page is; a number says nothing
10-best-tips-for-better-sleep10_Best_Tips_For_Better_SleepHyphens separate words; underscores and capitals do not read as cleanly
cafe-and-creme-brulee-guidecafé-&-crème-brûlée-guideAccents and symbols turn into ugly percent codes in real addresses
how-to-write-numbers-in-wordshow-to-write-numbers-in-words-a-complete-beginners-guide-with-examplesThe short one is scannable; the long one gets cut off everywhere

Notice the pattern in every good row: only lowercase letters, numbers, and hyphens. Nothing else is needed.

The six rules for a clean slug

1. Keep it short. A slug should carry the words that matter and drop the rest. Long slugs get cut off in search results, break awkwardly in messages, and are harder to read aloud or type. If your slug runs past roughly 60 characters, trim it to the essential words — the topic, not the whole headline.

2. Use hyphens, not underscores. Search engines treat a hyphen as a space between words, so best-tips reads as two words. An underscore joins them into one unreadable word. Hyphens are the safe default everywhere. One related quirk: apostrophes also become hyphens, so “Beginner’s” turns into beginner-s — harmless, but another reason to keep titles simple before converting.

3. Use lowercase only. Some servers treat Page and page as two different addresses, which can split your traffic and create duplicate pages. Lowercase everywhere removes the problem completely. Never publish a slug with a capital letter in it.

4. Strip accents. Letters like é, ñ, and ü are fine in a headline but trouble in an address: browsers convert them into long percent codes (caf%C3%A9...) that nobody can read or trust. Convert accented letters to their plain base letters first — café becomes cafe, crème becomes creme — and the slug stays clean in every browser.

5. Spell out the ampersand. The & character has a special job inside web addresses, so it should never appear raw in a slug. The readable fix is to write it as the word “and”: “Café & Crème Brûlée Guide” becomes cafe-and-creme-brulee-guide, which keeps its full meaning instead of dropping a word or breaking the link.

6. Stop words are optional. Little words like “a”, “the”, and “of” add length without meaning, so dropping them is good practice: best-tips-better-sleep still reads perfectly. But never drop a word that changes the meaning, and never mangle the grammar so far that the slug stops making sense. One honest note about our own tool: it keeps every word you type — it does not remove stop words for you — so if you want them out, delete them from your headline before you convert it.

Try it on your own headline

Typing a slug by hand is where the mistakes creep in — a missed capital, a leftover accent, an underscore out of habit. Run your headline through the free slug generator and check the result before you publish. It converts live as you type, entirely in your browser, so titles of unpublished posts go nowhere.

Two real conversions from the tool, exactly as they come out:

  • “How to Write Numbers in Words!” becomes how-to-write-numbers-in-words (29 characters).
  • “Café & Crème Brûlée Guide!” becomes cafe-and-creme-brulee-guide (27 characters) — accents stripped, & spelled out as “and”.

The tool’s controls match the six rules above: a separator choice (hyphen by default, underscore if you ever need it), a force-lowercase option switched on by default, and an optional maximum length that trims at a word boundary instead of cutting a word in half. Every result shows its character count underneath, and you can copy it or download it as a text file.

Try it yourself: Slug Generator

One warning: do not change a slug casually after publishing

For a brand-new post, choose the slug before you publish and you are done. For a page that is already shared or indexed, changing the slug breaks every old link to it unless you set up a redirect from the old address to the new one. If you cannot set up a redirect, keep the old slug — a slightly imperfect slug that works beats a perfect slug that leads nowhere.

FAQ

Hyphen or underscore — which one?

Hyphen, always. Search engines read hyphens as word separators; underscores do not separate words. The tool defaults to hyphens for exactly this reason.

Can a slug have capital letters?

Technically yes, but do not do it. Mixed case risks duplicate addresses on some servers and looks inconsistent everywhere. Lowercase is the rule with no exceptions worth making.

Should I keep numbers in a slug?

Yes, when they carry meaning. A year, a list count, or a version number helps the reader: 10-best-tips-for-better-sleep is clearer than best-tips-for-better-sleep. Drop numbers only when they are meaningless, like a date stamp nobody needs.

Should I remove stop words like “a” and “the”?

It is good practice but not a law. Shorter slugs read better, so remove stop words when the slug still makes sense without them. Just remember the tool keeps every word you type — delete stop words from your headline first if you want them gone.