Skip to content
ToolShelf

Slug generator

Turn a title into a URL slug: lowercased, accents folded, punctuation removed and spaces joined. When nothing can be kept you get a warning rather than an empty box.

Your title

Your text stays in this tab. The work is done by JavaScript in your browser. None of it is uploaded, logged or saved, and the tool keeps working with the network off.

How to build it

Separator
Rules

Optional. Cuts at a word boundary rather than mid-word.

Slug

Your slug appears here.

What the slug does

It is the readable part of the address, the crunchy-chocolate-cookies in example.com/recipes/crunchy-chocolate-cookies. A good one says what the page is before anyone clicks, survives being pasted into a message without turning into a wall of percent signs, and does not change once it is published.

Hyphens, lowercase, and why

Hyphens rather than underscores. Search engines have long read a hyphen as a space between words and an underscore as a joiner, so blue-widgets is two words and blue_widgets is one. Underscores are here because file names and some systems want them, not because a URL does.

Lowercase. Paths are case-sensitive on most servers, which means /About and /about can both exist as separate pages with the same content and half the links each. Lowercasing removes the possibility rather than relying on nobody making the mistake.

Accents come off. Other scripts do not.

Accents are folded away by decomposing each letter and dropping the mark: Crème brûlée becomes creme-brulee. Latin letters with no accent to strip are spelled out instead, ß as ss, ø as o, þ as th, æ as ae, because those spellings are settled and the same wherever the letters are used.

Cyrillic, Greek, Arabic and CJK have no such shortcut. Turning привет into privet is transliteration, it needs a per-language table, and the tables disagree with one another, the same Russian name has several accepted spellings in English. Rather than ship one and be quietly wrong, the tool drops what it cannot handle and says so instead of handing back an empty box.

The better answer for those languages is usually to keep the letters. Every current browser handles a Unicode slug, and a reader of the language can actually read it. That is what turning off “ASCII letters only” does.

Length

There is no technical limit worth worrying about, and the specific numbers that circulate about slug length and SEO are folklore rather than published rules. Short enough to read, long enough to say what the page is. The limit here is optional and cuts at a word boundary, because a slug truncated mid-word is worse than a slightly longer one.

Changing one later

Every link to the old address breaks unless you redirect it, including the ones you do not know about, in other people’s bookmarks and messages. If a page has been live and linked to, a better slug is rarely worth the breakage. Set up a permanent redirect if you change it anyway.

Questions

What is a URL slug?
The readable part of a web address that identifies the page, the 'crunchy-chocolate-cookies' in example.com/recipes/crunchy-chocolate-cookies. A good one tells a person what the page is before they click it, and tells a search engine the same thing.
Is my text sent anywhere?
No. The slug is built in your browser and nothing is uploaded, logged or stored. Titles of unpublished pages are exactly the kind of thing that should not be posted to somebody else's server to be tidied up.
Should I use hyphens or underscores?
Hyphens. Search engines have long treated a hyphen as a word separator and an underscore as a word joiner, so 'blue-widgets' reads as two words and 'blue_widgets' as one. Underscores are offered because file names and some systems expect them, but for a public URL the hyphen is the right default.
Why lowercase?
Because paths are case-sensitive on most web servers, so /About and /about can both exist as separate pages. That splits links and traffic between two addresses for the same content. Lowercasing everything removes the possibility.
What happens to accented letters?
They are folded to their base letters: 'Crème brûlée' becomes 'creme-brulee'. Letters that have no accent to strip are spelled out instead, ß becomes ss, ø becomes o, þ becomes th, because those are settled spellings rather than guesses.
Why did my Russian or Japanese title produce nothing?
Because ASCII-only mode was on and none of those letters is a Latin letter. Accent folding works by taking an accent off a Latin letter; Cyrillic, Greek, Arabic and CJK have no such shortcut, and romanising them needs a per-language table where the tables disagree with each other. Rather than guess, the tool says what happened. Turn off 'ASCII letters only' to keep the original letters. Every current browser handles a Unicode slug.
Should slugs be short?
Short enough to read, long enough to say what the page is. There is no limit that matters technically, and the specific numbers quoted around SEO are folklore rather than published rules. Cutting off mid-idea to hit a number is worse than a slightly longer slug, which is why the length limit here is optional and cuts at a word boundary.
Can I change a slug after publishing?
You can, but every existing link to the old address breaks unless you redirect it. If a page has been live and linked to, changing the slug is rarely worth it; set up a permanent redirect from the old one if you must.

More tools