Skip to content
Guides

How to make a URL slug that survives the internet

A good slug is readable, short, and forever-stable. Here are the rules — and the gotchas with non-Latin scripts and emojis.

May 26, 20263 min read
CLEAN URLSSlugsGUIDETITLEHello World! PostURL SLUGhello-world-postLowercase · dashes · no symbols

A slug is the readable part of a URL: /blog/how-to-make-a-slug instead of /blog/12345. It looks trivial. But slugs are forever — once shared, they get bookmarked, linked, indexed. The Slug Generator turns any title into one safely.

What makes a good slug

A slug should be:

  1. Readable. A human glancing at the URL bar should understand what the page is about.
  2. Short. Under 80 characters total URL is a soft rule; under 60 for the slug itself is better.
  3. Lowercase. Mixed case in URLs is technically valid but treated inconsistently. Always lowercase.
  4. Hyphen-separated. Google explicitly recommends hyphens over underscores. Spaces become %20 which looks ugly.
  5. No stopwords. "How to" and "a" and "the" can be dropped without losing meaning.
  6. Stable. Once published, never change.

The last one is the hardest. People want to "fix" a slug after the fact, but a redirect chain is always worse than a slightly-imperfect URL that's been live for two years.

The slug generator's options

  • Separator: - (default), _ (Python file convention), or . (some legacy systems).
  • Lowercase: almost always on.
  • ASCII-only: strips non-Latin characters entirely. Off by default — leaves accents and Unicode as-is.
  • Trim & dedupe: removes leading/trailing separators and collapses multiple separators in a row.

Combining these gets you any common slug style.

Non-Latin scripts and emoji

Here's where it gets nuanced.

Accented Latin (café, résumé): the generator normalizes via NFKD and strips combining marks. So "café" becomes "cafe" — readable, ASCII, and unambiguous.

Cyrillic / Greek / Arabic / Hebrew (русский, ελληνικά, العربية, עברית): preserved by default. URL-encoded in the address bar but readable to users of those scripts. Turn on "ASCII-only" if you want to strip them entirely (loses meaning, but ensures every URL looks the same).

CJK (中文, 日本語, 한국어): preserved by default. Same caveat — gets URL-encoded but renders as native script in modern browsers. This is the right choice for sites whose audience is in those languages.

Emoji (🎉, 🚀): stripped. They're not URL-safe, and even if your CMS handles them, copy-paste behavior is inconsistent across platforms.

Anti-patterns

  • Slugs with dates baked in: /blog/2026-05-27-how-to-make-a-slug ages the page artificially. If you republish or update, the date in the URL becomes a lie.
  • Slugs with IDs: /blog/12345-how-to-make-a-slug is a redundancy. Either use the ID alone or the slug alone.
  • Slugs that match the page title exactly: "How to Make a URL Slug (Updated 2026)" → how-to-make-a-url-slug-updated-2026. Too long. Drop the parenthetical.
  • Inconsistent slug rules across the site: if half your URLs use _ and half use -, fix the unification once and redirect forever.

For everyday "I just need a slug from this title" — paste, copy, ship. The generator does the right thing 99% of the time.

Tags#slug#url#seo#how-to

More from Guides

See all →