How to Make a URL Slug

A slug is the part of a web address that identifies the page in words: the how-to-make-a-url-slug in this page address. It is lowercase, hyphenated, and short enough to read aloud.

The rules

Lowercase only. Words separated by single hyphens. No spaces, no underscores, no punctuation. Numbers are fine. Length should be short enough to read and long enough to describe the page.

Those rules are conventions rather than requirements, but they are what every platform and search engine expects, and following them avoids a class of problems you would otherwise have to debug.

Turn a title into a clean slug.

Open the URL Slug Generator →

Why lowercase

Servers can be case sensitive. /About and /about can be two different pages on the same site, which splits any links and rankings between them.

Lowercasing everything removes the risk entirely, and lowercase is easier to type and to read in a link preview.

Why hyphens and not underscores

Search engines treat hyphens as word separators. Underscores are often treated as part of a word, so a slug written with underscores can be read as one long term.

Hyphens are also visible in an underlined link, while underscores disappear into the line. That matters for anyone reading a printed URL.

Removing accents and special characters

Accented characters get percent-encoded in a URL, producing strings such as %C3%A9 that are unreadable and hard to share. Transliterate them instead: é becomes e, ü becomes u.

For non-Latin scripts, the choice is a transliterated slug or a native-script slug. Native scripts work in modern browsers but are hard to type on a different keyboard, so many publishers transliterate.

Stop words

Short words such as the, a, of and for add length without adding meaning. Removing them gives a shorter slug: how-to-make-bread rather than how-to-make-a-loaf-of-bread.

Keep a stop word when removing it changes the meaning or makes the slug unreadable. Readability matters more than saving four characters.

Length

Aim for three to six words. Long slugs are hard to share, get truncated in some interfaces, and add nothing that the page content does not already say.

If the title is long, use its core phrase rather than the whole title. The h1 can stay long; the slug does not have to match it.

Slugs and SEO

Keywords in the slug help a reader decide whether to click, which is the main mechanism. The direct ranking effect is small, and stuffing keywords into a slug does not compensate for thin content.

What does matter is stability. A slug that changes loses the links and history pointing at it unless you redirect.

When to change a slug

Change it when the current one is wrong, misleading or badly spelled, and only with a permanent redirect from the old address to the new one.

Do not change it to add a keyword or to tidy a hyphen. The small gain is not worth the redirect chain and the lost signals.

Slug patterns for different page types

Page typePatternExample
How-to guidehow-to-verb-nounhow-to-merge-pdf
Tool pagenoun-toolword-counter
Comparisonx-vs-yjpg-vs-png
Question pagequestion-in-wordswhat-is-a-uuid

A consistent pattern makes the site easier to navigate and makes new pages faster to name.

Common mistakes

Checking a slug

Read it aloud. If you have to spell part of it, it is too long or too cryptic. Then check that it does not collide with an existing page, and that it still makes sense without the title next to it.

A slug that works in a bare link is a slug that will be shared correctly.

Slugs for non-Latin titles

A transliterated slug is easier to type and share, while a native-script slug preserves the original words. Both work in modern browsers.

Pick one policy for the whole site. Mixing the two makes the URL structure unpredictable.

Frequently asked questions

Should a slug match the title exactly?

Not necessarily. Use the core phrase from the title, in fewer words.

Do I need to change a slug to add keywords?

No. Changing it costs more in lost links than it gains.

Can a slug contain numbers?

Yes, and it often should, such as a year or a version that is genuinely part of the topic.

Sources

More free tools

Related guides