Slug Generator
Turn any title into a clean URL slug, with accent folding and transliteration.
Slug Generator tool
—
What this tool does
Turns a title into the part of a URL after the last slash: lowercase, ASCII, hyphen-separated, free of anything needing percent-encoding. It updates as you type and shows title and slug together, so you can see what each character became.
The list mode does the same for a whole column at once, which is what you want when you are generating permalinks for two hundred imported posts rather than one new page.
Common uses
- Creating a permalink for a CMS post, a documentation page or a product listing.
- Migrating content into a static site generator, where every Markdown file needs a filename derived from its title.
- Naming a Git branch or a Kubernetes resource, both of which reject most punctuation.
- Building a stable anchor
idfor a heading.
A short example
The title:
Café Müller & Søn — 50% Off Naïve Piñata Crème Brûlée! becomes:
cafe-mueller-and-son-50-percent-off-naive-pinata-creme-brulee
Four mechanisms did that: ü was transliterated to ue,
& expanded to and, é and ï were folded
to bare letters, and punctuation became separators that were collapsed and trimmed.
Folding versus transliteration
Accented Latin letters are handled by Unicode normalisation, not a lookup table. Normalising
to NFD splits é into e plus a combining acute accent; deleting every
combining mark leaves e. One rule covers Latin-1, Central European and
Vietnamese, including stacked marks like the ế in Tiếng Việt.
Some letters cannot be folded that way, because their ASCII form is a different letter or
several: ß, ø, ł, æ, þ and
every Cyrillic character. Those come from an explicit table. German umlauts follow the German
convention — ä → ae, so Müller becomes
mueller, matching DIN 5007 variant 2 and what German sites publish. Cyrillic
follows the usual English romanisation, so щ is shch and
ж is zh.
Scripts with no entry — Chinese, Japanese, Arabic, Hebrew, Thai — cannot be transliterated by any rule this small, so those characters are dropped and named. If the result comes back empty, that is why.
Worth knowing
Slugs are permanent in practice: changing one after publication breaks every inbound link
unless you add a redirect, so set the maximum length before publishing. Truncation happens at
a separator, never mid-word — a 40-character cap turns
getting-started-with-static-site-generators into
getting-started-with-static-site, not …-generat.
Length itself is not a ranking factor. Google has said repeatedly that words in a URL are a
very small signal; the argument for a short slug is that people paste URLs into chat. One
habit worth keeping is leaving dates out unless they are part of the identity — a slug
containing 2024 looks stale the following January.
Frequently asked questions
Can a URL contain accented or non-Latin characters?
It can, but never literally. RFC 3986 restricts a path to ASCII, so café travels as caf%C3%A9 — and that percent-encoded form is what a reader copies out of the address bar into a chat message, an email or a log line. Add that different scripts contain characters which render identically, and plain ASCII remains the right default for any URL shared by hand.
Hyphens or underscores in a slug?
Hyphens. Google’s URL structure guidance recommends them explicitly and treats an underscore as a word joiner rather than a separator, so blue_widget can be read as a single token where blue-widget is unambiguously two. An underscore also vanishes beneath the underline most browsers and chat clients draw under a link. A literal space is worse again: it becomes %20 and breaks links pasted into plain text.
Are slugs case-sensitive?
The path is. RFC 3986 §6.2.2.1 makes only the scheme and host case-insensitive, so /About-Us and /about-us are two distinct URLs. IIS and a default macOS filesystem nevertheless serve both from the same file, so both resolve and a crawler sees duplicate content at two addresses. Keep slugs lowercase, and where mixed-case links already exist, send a 301 rather than answering at both.