What Is a Slug?
A slug is the human-readable part of a URL that identifies a page. In
example.com/blog/best-coffee-grinders-2025, the slug is
best-coffee-grinders-2025. It is the difference between a link you can read aloud and
a link that is /post?id=48291. Slugs are created by transforming a title — usually a
page title or article heading — into a URL-safe string: lowercased, stripped of punctuation and
accents, with spaces replaced by hyphens. WordPress, Shopify, Notion, static site generators, and
nearly every CMS either generate a slug for you or let you set one, and content teams obsess over
them because they sit at the intersection of SEO, shareability, and link durability.
Why Slugs Matter
- Search engine relevance: the slug is one of the strongest on-page signals about what a page is about. A URL containing the topic's keywords — "coffee-grinders" — tells search engines and users what the page covers before it even loads.
- Shareability: a readable slug survives copy-paste, chat apps, and printed materials. People are dramatically more likely to click a link they can parse with their eyes.
- Trust: URLs are shown in browser chrome, search results, and email clients. "example.com/guides/best-coffee-grinders-2025" reads as a legitimate article; a parameter soup reads as spam.
- Link durability: a descriptive slug keeps working even if the page's title changes later — the URL itself becomes the stable identifier that other sites link to.
- Analytics and logs: support tickets and server logs full of readable slugs are infinitely easier to triage than streams of numeric IDs.
Exactly How This Tool Slugifies
The transformation runs five deterministic steps, in this order:
- Unicode normalization (NFD): accented letters are decomposed into a base letter plus a combining mark — é becomes e + accent.
- Diacritic stripping: every combining mark is removed, so café becomes cafe and naïve becomes naive.
- Character filtering: anything that is not an ASCII letter, digit, space, or hyphen is deleted — punctuation, emoji, symbols, and non-Latin scripts all go.
- Trim and lowercase: leading and trailing whitespace is removed and everything is converted to lowercase.
- Separator collapsing: every run of spaces and hyphens becomes a single hyphen — "A — B" and "A---B" both become "a-b".
Apostrophes inside words are simply removed ("don't" becomes "dont"), matching how most CMSs handle them, and existing hyphens are preserved so "state-of-the-art" stays "state-of-the-art".
Slugs on Every Platform
The word "slug" comes from the newsroom, where it named a short identifier for a story in the
production pipeline, and the web adopted it wholesale. WordPress calls a post's slug its
post_name and lets you edit it on the publish screen; Shopify derives product "handles"
from product titles; Notion pages get slugs you can rename; Medium rewrites titles into slugs
automatically. Static site generators like Astro, Hugo, and Next.js commonly use the markdown
filename or an explicit slug field in front matter to build URLs, and many APIs expose
human-readable resource routes that are nothing but slugs under the hood. The practical
consequence: even if you never touch a CMS setting, every link you share is quietly built from a
slug, and knowing how they are derived helps you predict what URLs your site will actually produce.
Evergreen vs Dated Slugs
One strategic choice is whether slugs carry dates. /blog/2025-03-best-coffee-grinders
communicates freshness and is a common pattern on news and review sites, but it guarantees the URL
will look dated next year and tempts editors to create a new post instead of updating the old one.
An evergreen slug like /blog/best-coffee-grinders keeps one URL accumulating all the
ranking and link equity over years, at the cost of not signaling how new the content is. There is
no universal right answer — many teams use dates for time-sensitive content and evergreen slugs for
reference material — but the choice should be deliberate, because switching strategies later means
mass redirects.
Step-by-Step: One Title, End to End
Take the title The Best Coffee Grinders (2025 Guide)!. Step 1 and 2 change nothing — there
are no accents. Step 3 deletes the parentheses and the exclamation mark, leaving
The Best Coffee Grinders 2025 Guide. Step 4 gives the best coffee grinders 2025
guide. Step 5 replaces every space with a hyphen:
the-best-coffee-grinders-2025-guide. That is the slug. Every input follows the same
pipeline, which is what makes the output predictable — paste any of the examples below and the
results should match exactly.
Reference Table
| Title / Text | Slug |
|---|---|
| The Best Coffee Grinders (2025 Guide)! | the-best-coffee-grinders-2025-guide |
| How To Brew A Perfect Pour-Over — Step By Step | how-to-brew-a-perfect-pour-over-step-by-step |
| Café Crème & Other European Coffee Drinks | cafe-creme-other-european-coffee-drinks |
| 10 Kitchen Tools You Actually Need | 10-kitchen-tools-you-actually-need |
| Don't Do This With Your Espresso Machine | dont-do-this-with-your-espresso-machine |
| 日本語の記事タイトル | (empty — no Latin letters or digits) |
The last row demonstrates the non-Latin edge case: a title made entirely of CJK characters has nothing left after filtering, so the slug is empty — and the widget flags that instead of silently returning nothing.
Slug Best Practices
- Keep it short: three to five words is the sweet spot. Everything after that dilutes the keywords and makes the URL harder to scan.
- Lead with the keyword: put the primary topic near the front of the slug, where both users and search engines look first.
- Drop stop words: "the", "a", "and", "of", and similar filler words add nothing to "the-best-coffee-grinders-of-2025" — "best-coffee-grinders-2025" is stronger.
- Hyphens, not underscores or spaces: hyphens are word separators; underscores and spaces are not.
- Don't change published slugs casually: a changed slug is a broken link everywhere it was shared. If it must change, redirect the old one.
Troubleshooting
My Slug Came Out Empty
The input contained no ASCII letters or digits — typically all-CJK, all-Arabic, or all-emoji text. Slugify the romanized or translated version instead, or keep a numeric ID.
The Slug Is Longer Than I Want
This tool transforms, it doesn't summarize. Trim the title first ("The Best Coffee Grinders Under $200 in 2025 — A Buyer's Guide" to "Best Coffee Grinders 2025") and re-run; you control the length.
Length and Character Limits
Browsers handle very long URLs, but practical limits live elsewhere: WordPress historically capped slugs at 200 characters, some platforms refuse non-ASCII slugs, and analytics dashboards mangle URLs with heavy percent-encoding. A slug that stays under roughly 75 characters — six to nine words — is safe everywhere and scans well in print and chat.
Changing Slugs Breaks Links
Any published slug is a contract with the web. When you absolutely must change one, add a 301 redirect from the old URL to the new so rankings and bookmarks survive the move.