Web
Generate a URL slug
A slug is the readable part of a URL, and it is read by people as much as by crawlers. Accents are folded rather than dropped, so “Café Société” becomes cafe-societe instead of caf-soci-t.
Slug appears here.
How to use it
- Paste the headline or title.
- Choose a hyphen or underscore separator.
- Leave “lowercase” on unless your URLs are deliberately mixed case.
- Copy the slug into your CMS permalink field.
What a slug is actually for
Search engines read the words in a URL, and so do people deciding whether a link is worth clicking. A slug containing the topic is slightly better for ranking and considerably better for trust than a numeric ID. The ranking effect is small; the effect on how the link looks when pasted into a chat window is not.
Non-Latin slugs
Chinese, Japanese and Arabic slugs work in every current browser and are indexed correctly. The catch is that they appear percent-encoded when copied into many tools — a readable link becomes a wall of %E4%B8%AD%E6%96%87. For a site with an international audience, a transliterated or English slug is often the more usable choice even though the original is technically valid.
A URL is a promise
Once a slug is indexed and shared, changing it breaks every link that points at it. If it must change, serve a 301 from the old path to the new one and keep that redirect for at least a year — the accumulated signals move with it, and without it they are simply lost.
Practical rules: lowercase, hyphens rather than underscores (Google treats hyphens as separators, underscores as joiners), drop stop words only when the meaning survives without them, and keep the slug short enough to be readable when pasted into a chat window. Dates in slugs age badly; the article stays current, the URL says 2019.
Frequently asked questions
Why fold accents instead of removing them?
Decomposing the character with Unicode NFD splits “é” into “e” plus a combining mark, which is then discarded — the letter survives. Removing non-ASCII bytes outright would delete the letter entirely.
What happens to Chinese or Japanese text?
CJK characters are preserved rather than transliterated. Modern browsers and search engines display them correctly in URLs, and a pinyin translation would be both slow and frequently wrong.
Should I use hyphens or underscores?
Hyphens. Search engines treat them as word separators; underscores are treated as joining words into one token. Use underscores only where a platform already does.
Is a shorter slug always better?
Usually, but not at the cost of meaning. Keep the words someone would search for and drop the rest — articles, conjunctions and dates go first.
Should the slug keep stop words?
Usually drop them: how-to-make-bread beats how-to-make-the-best-bread-in-the-world. Keep a word if removing it changes the meaning.
What happens to Chinese or Arabic titles?
There is no transliteration without a dictionary. Either keep the characters (legal in URLs, and they display fine) or supply a hand-written English slug — do not let a generic tool produce pinyin soup.