If you look at the URL of this article, you'll see the word "url-slug-guide" at the end. That's a slug — a short, descriptive, URL-safe string that identifies a specific page. Getting slugs right has real SEO consequences, and the rules are simple once you know them.

What is a URL Slug?

A slug is the human-readable part of a URL that identifies a specific page. In the URL:

https://example.com/blog/how-to-write-better-headlines

The slug is how-to-write-better-headlines. The name comes from the newspaper industry, where a "slug" was a short nickname given to a story while it was being written.

Slugs are distinct from other URL components like the domain name, path, query parameters, and fragment identifiers. They sit at the end of the path and should uniquely and descriptively identify the page's content.

Why Slugs Matter for SEO

Google uses the URL of a page as a ranking signal, and a well-crafted slug can help in several ways:

  • Keyword relevance — Search engines read the words in a URL. A slug containing your target keyword gives a small ranking signal and confirms relevance.
  • Click-through rate — A clear, readable slug in search results tells users what to expect before they click. "how-to-convert-text-to-lowercase" is more compelling than "page?id=7832".
  • Link sharing — Descriptive slugs are easier to recognize and share. When a URL is pasted into a chat message or document, a readable slug tells the reader what it links to.
  • Avoiding crawl issues — Slugs that are too long or contain special characters can cause crawling and indexing problems.

The Rules for Good Slugs

1. Use lowercase letters only

URLs are case-sensitive on most servers. /Blog/My-Post and /blog/my-post can point to different pages (or one can return a 404). Slugs should always be lowercase to avoid confusion and duplicate content issues.

2. Replace spaces with hyphens

Spaces are not valid in URLs without encoding. The browser will encode a space as %20, which looks terrible and is hard to read. Use hyphens (-) as word separators instead. Avoid underscores — Google treats hyphens as word separators but underscores as word connectors, so text-tools is two words to Google while text_tools is one word.

3. Remove special characters and punctuation

Characters like ?, &, #, %, and accented letters need to be URL-encoded or removed. A slug should contain only lowercase letters, numbers, and hyphens.

4. Normalize accented characters

Convert accented characters to their ASCII equivalents before generating the slug: "café" → "cafe", "über" → "uber", "naïve" → "naive". This ensures the slug works across all browsers and server configurations.

5. Keep it concise

Shorter slugs are better. They're easier to remember, share, and type. Aim for the minimum number of words that accurately describe the page. Remove stop words (a, an, the, and, or, but, in, on, at, to, for) where possible without losing clarity.

"how-to-convert-text-to-lowercase-online-for-free" is too long. "convert-text-lowercase" is probably enough.

6. Use hyphens, not underscores

As mentioned, Google's John Mueller has explicitly confirmed that hyphens are the preferred word separator in URLs. Underscores are treated as part of the word: text_tools is indexed as the single word "texttools" by Google.

7. Avoid changing slugs after publishing

Once a page is indexed and has backlinks, changing its slug will break those links and cause you to lose accumulated SEO authority — unless you set up a proper 301 redirect from the old URL to the new one.

Good vs. Bad Slug Examples

Original Title
Bad Slug
Good Slug
"How to Convert Text to Lowercase"
How-To-Convert-Text-To-Lowercase-Online-For-Free
convert-text-lowercase
"What is camelCase?"
what_is_camelCase?
what-is-camelcase
"10 Best Tools for 2025!"
10-Best-Tools-for-2025!
best-tools-2025
"Über diese Anwendung"
%C3%BCber-diese-anwendung
uber-diese-anwendung

How to Generate Slugs Automatically

Manually creating slugs following all these rules is error-prone. Use our free slug generator to convert any text to a clean slug instantly:

  1. Paste your article title or text into the Input field
  2. Click the slug-case button
  3. The result is a properly formatted, lowercase, hyphenated slug with accents removed

Our converter handles spaces, mixed case, punctuation, special characters, and accented letters automatically — giving you a clean, SEO-friendly slug ready to use in your CMS or code.

Slug vs. slug-case vs. kebab-case

You may encounter these three terms used interchangeably — and that's mostly fine:

  • Slug — the URL-specific string (lowercase, hyphens, ASCII only)
  • slug-case — the naming convention that produces strings in slug format
  • kebab-case — a programming convention using the same format, used for CSS classes, CLI flags, and file names. Kebab-case doesn't necessarily strip accents the way URL slugs do.