URL Slug Generator

URL Slug Generator

Generate SEO-friendly URL slugs from text. Convert titles to clean URLs with diacritics removal. Free online slug generator for websites

A URL slug looks trivial until you ship a blog post titled "Müller's ‹Über›—2 things you didn't know!" and your slug becomes /mullerseberthingsyoudidntknow. The interesting work is in transliteration, separator handling, and choosing whether to lowercase Turkish-dotted i. This generator handles 25+ scripts via ICU-style transliteration, lets you pick separator and case rules, and shows the byte length so you stay under the 75-byte limit most CMSes silently enforce.

What a "good" slug actually requires

  • ASCII-only output — most URL routers handle Unicode in path segments now, but search engines, social media link previews, and email clients still mangle non-ASCII URLs in ways that are hard to debug.
  • Lowercase — URLs are case-sensitive per RFC 3986, but case-insensitive in practice on most servers. Forcing lowercase prevents /Hello-World and /hello-world being treated as different by some caches and identical by others.
  • No leading/trailing separators — /-hello-world-/ is technically valid but ugly and breaks some URL parsers.
  • No consecutive separators — collapse "hello---world" to "hello-world". Multiple hyphens almost always come from punctuation removal.
  • Stable under repeated application — slug(slug(x)) === slug(x). If your generator can produce slugs it cannot re-slug to the same value, expect database drift.

Working example: transliteration across scripts

Input

Title: Müller's ‹Über› café — Привет, 北京!
Separator: -
Lowercase: yes
Max length: 60

Output

mullers-uber-cafe-privet-beijing

Each script gets its own transliteration: ü→u (German convention), Cyrillic Привет→Privet (Scientific transliteration), 北京→Beijing (Hanyu Pinyin without tones). Smart quotes, em-dash, and brackets become separators which then collapse. Note Hanyu Pinyin produces "beijing" not "bei-jing" — word boundaries inside a single CJK term are not preserved.

Edge cases that bite in production

  • The Turkish dotted/dotless i — lowercasing İ (U+0130) in a Turkish locale gives i (U+0069), in an English locale gives i with combining dot (i + U+0307). Most CMSes lowercase in English locale, which is "wrong" for Turkish content but "stable" for the system.
  • The German eszett — ß lowercase is ß, uppercase is SS in standard German but ẞ (U+1E9E) in modern usage. Transliteration to ASCII almost always uses "ss".
  • Empty slugs — input of only emoji or punctuation collapses to empty string. Decide whether to fall back to a generated ID, the post number, or to reject the input entirely.
  • Reserved words — your router may break on slugs like "new", "edit", "admin", or numeric-only strings. Filter against a route allowlist before saving.
  • Bytewise length limits — Twitter's old 23-character URL shortener, Apache mod_rewrite's 255-byte limit, and many CMS DB columns capped at varchar(75) or varchar(255). The byte count of an ASCII slug equals its character count, but if you allow Unicode through, one emoji can be 4 bytes.

When to reach for this tool

  • You are building a CMS or static site generator and need to slugify article titles consistently across languages.
  • You are migrating from one platform to another and need to recompute slugs from existing titles — the new generator must match the old one (or you bake redirects for every changed slug).
  • You are debugging why French articles with é/è/ç end up with garbled URLs and want to compare server-side and client-side slug logic.
  • You inherited a database of slugs and need to verify they are all under 75 bytes and contain no reserved characters before a migration.

What this tool will not do

  • It will not enforce uniqueness across your dataset. Two articles titled "Hello World" produce the same slug. Append -2, -3, etc. on the server, or seed with a short hash of the row ID.
  • It will not produce URL-encoded slugs. If you want emoji in URLs, use percent-encoding (%F0%9F%9A%80 for 🚀) — but expect it to look terrible in browser address bars on copy-paste.
  • It will not preserve word boundaries inside CJK text without a tokenizer (jieba, MeCab, Khaiii). Whole-string Pinyin transliteration produces unbroken runs of letters.

Slug generation runs entirely client-side. Paste internal article titles without sending them to a server.

Frequently asked questions

Why does my slug-generator produce different output than WordPress?

WordPress slugifies via sanitize_title() which has its own transliteration table tuned for Latin-script European languages. For non-Latin scripts WordPress leaves bytes encoded as percent-escapes by default. Different transliteration libraries produce different ASCII outputs from the same Unicode input — there is no canonical answer.

Should slugs use hyphens or underscores?

Hyphens. Google has stated for fifteen-plus years that hyphens are treated as word separators in URLs and underscores are not. SEO impact is small but not zero, and hyphens are easier to read.

Can I include numbers in slugs?

Yes, but be careful with pure-numeric slugs — they collide with ID-based routes like /posts/123. Either prefix with a letter or ensure your router resolves slugs and IDs in different namespaces.

How long should a slug be?

Most SERP snippets show ~60 characters of URL path. Aim for under 60 visible characters; under 75 bytes to fit common DB constraints. Truncate at a word boundary, never mid-word, and never mid-multibyte-character if you accept Unicode.

Are non-ASCII slugs bad for SEO?

Modern Googlebot handles IRI (Internationalized Resource Identifiers) fine. The friction is social — most copy-paste tools, email clients, and chat apps still mangle Unicode URLs into percent-encoded blobs that look spammy in a link preview. For broad audience reach, ASCII slugs are still the safe default.

How do I handle slug changes when an article is renamed?

Two policies: (1) keep the original slug forever, ignore renames — stable URLs, sometimes-stale slugs. (2) Generate a new slug on rename and serve a 301 redirect from the old one — clean URLs but you accumulate redirects. Pick one and document it; mixing the two leads to broken links.

Related tools

Last updated · E-Utils editorial team