An SEO-friendly URL slug is the short, readable part of a web address that names a single page, such as seo-friendly-url-slugs in https://example.com/blog/seo-friendly-url-slugs. A good slug is lowercase, separates words with hyphens, drops punctuation, and describes the page in a few words that include its main keyword.
You can write slugs by hand, but a slug generator does the mechanical part for you: it lowercases the text, converts accented letters, strips symbols and joins the words with the separator you choose. This guide covers the rules worth following, real before-and-after examples, and the mistakes that cost you links.
What is a URL slug?
The slug is the last segment of the URL path, the part that identifies one specific page rather than the site or section.
https://example.com/blog/seo-friendly-url-slugs
└───┘ └─────────┘ └──┘ └────────────────────┘
scheme domain path slug
Content management systems such as WordPress create a slug from the page title automatically. That default is a starting point, not a finished slug: long titles produce long URLs, and punctuation or symbols can produce odd results.
Why URL slugs matter for SEO
Google's own URL structure guidance asks for simple, descriptive words in URLs and recommends hyphens instead of underscores to separate words. A slug is a light ranking signal at most. Its bigger value is clarity: people see the URL in search results, in browser tabs and in shared links, and a readable slug tells them what the page is about before they click.
Slugs also last. Once other sites link to a URL, changing it means setting up redirects. Getting the slug right before you publish saves work later.
Rules for writing SEO-friendly slugs
- Use lowercase only. Many web servers treat URL paths as case-sensitive, so
/About-Usand/about-uscan become two different pages. - Separate words with hyphens. Hyphens are the separator Google recommends for URLs.
- Keep it short. Most strong slugs are three to six words. Cut anything that doesn't help someone recognize the page.
- Include the main keyword. Use the phrase people search for, written naturally, once.
- Drop filler words when the meaning survives. Words such as "a", "the", "and" and "how to" can often go:
make-sourdough-breadreads as clearly as the longer version. - Avoid details that go stale. Years, list counts ("top-7") and version numbers date the page and tempt you to change the URL later.
- Use plain letters and numbers. Accents, symbols and spaces get percent-encoded in URLs and become hard to read and share.
- Make each slug unique and stable. Two pages should never compete for the same slug, and a published slug should only change with a 301 redirect.
Examples: from title to slug
Here is what our slug generator produces from real titles, and how you might shorten the result by editing the input.
| Title you type | Generated slug | Shorter final slug |
|---|---|---|
| How to Make Sourdough Bread at Home: A Complete Beginner's Guide | how-to-make-sourdough-bread-at-home-a-complete-beginners-guide |
sourdough-bread-beginners-guide |
| 10 Tips for Café Owners: Brew Better Coffee! | 10-tips-for-cafe-owners-brew-better-coffee |
cafe-coffee-tips |
| Crème Brûlée: The Easy Way | creme-brulee-the-easy-way |
easy-creme-brulee |
| C++ & C# Guide (2nd Edition) | c-c-guide-2nd-edition |
cpp-csharp-guide |
The last row shows why you should always read the result. Symbols such as +, & and # are removed, so "C++ & C#" collapses to c-c. When a symbol carries meaning, spell it out in the input before you generate the slug.
Hyphens, underscores or dots?
| Separator | Example | Best for |
|---|---|---|
| Hyphen (-) | easy-creme-brulee |
Page URLs. This is the separator Google recommends. |
| Underscore (_) | easy_creme_brulee |
File names, database keys and identifiers in code |
| Dot (.) | easy.creme.brulee |
Naming schemes that already use dots, such as some config keys |
For web pages, use hyphens. Reach for underscores or dots only when the system you're naming things for expects them.
How to use the Slug Generator
- Open the Slug Generator.
- Type or paste your title into the String to Slugify field. It accepts up to 2,000 characters.
- Pick a separator: Hyphen (-), Underscore (_) or Dot (.).
- Read the Generated Slug, which updates as you type. The tool lowercases everything, turns accented letters into plain ones (é becomes e, ü becomes u), transliterates other scripts such as Cyrillic, Chinese and Japanese, removes punctuation, writes the @ sign as "at" and collapses repeated spaces and separators into one.
- Delete words you don't need from the input until the slug is short and clear, then click Copy. Clear empties the field for the next title.
The generator keeps every word you give it. Deciding which words to cut is your call, which is why editing the input is part of the process.
Common slug mistakes to avoid
- Publishing the full headline. A 12-word slug gets cut off in search results and is hard to share. Trim it to the core topic.
- Changing a live slug without a redirect. Every existing link and bookmark breaks. If you must change it, add a 301 redirect from the old URL to the new one.
- Keyword stuffing.
best-cheap-running-shoes-cheap-running-shoeslooks spammy to people and search engines alike. - Trusting automatic romanization. The generator transliterates other scripts sound by sound: "Привет мир" becomes
privet-mir, and "東京 travel guide" becomesdong-jing-travel-guide, because Chinese characters are read as Mandarin pinyin. Readers know that city as Tokyo, so swap in the familiar word yourself, such astokyo-travel-guide. - Duplicate slugs. Many CMSs silently append
-2to a repeated slug. To check a batch of planned slugs for repeats, paste them into the duplicate line remover.
Slugs are one piece of on-page writing. Check that your title fits in search results with the word and character counter, and see common character limits for titles and meta descriptions. If you need kebab-case or snake_case for code rather than URLs, the case converter and our guide to text case styles cover the differences.
Frequently asked questions
What is a slug in a URL?
A slug is the human-readable part of a URL that identifies a specific page, usually the last segment of the path. In example.com/blog/easy-creme-brulee, the slug is easy-creme-brulee.
Should I use hyphens or underscores in URLs?
Use hyphens. Google's URL guidance recommends hyphens instead of underscores to separate words, and hyphens are the convention most readers expect in web addresses.
How long should a URL slug be?
There is no fixed limit, but short slugs work best. Aim for three to six words that name the topic and include the main keyword.
Should I remove stop words from a slug?
Remove words such as "a", "the" and "of" when the slug still reads clearly without them. Keep them when dropping them would change or blur the meaning.
Can I change a URL slug after publishing?
Yes, but add a 301 redirect from the old URL to the new one so existing links, bookmarks and search rankings carry over. Change published slugs only when the benefit is clear.
Does the slug generator handle accented characters?
Yes. It converts accented Latin letters to their plain versions and transliterates Cyrillic, so "Crème Brûlée" becomes creme-brulee. Chinese, Japanese and Korean text is romanized too, but Japanese kanji are read as Mandarin pinyin, so check the result and use the familiar spelling where it differs.