Open Tools LibraryOpen Tools Library
Back to Blog
SEOHow-to5 min read·July 26, 2026

What Makes a Good URL Slug (And How to Write One)

The part of a URL after the last slash is small, but it's one of the few pieces of on-page SEO you fully control. Here's how to get it right, including at scale.

What a slug is, and why it's worth thinking about

A slug is the part of a URL that identifies a specific page — in yoursite.com/blog/best-coffee-shops-in-sao-paulo, the slug is best-coffee-shops-in-sao-paulo. It's easy to treat as an afterthought, since most CMS platforms generate one automatically from your title. But a slug shows up in three places that matter: the search results page (where a clean, readable URL can nudge a click), the browser address bar (where it's the only always-visible summary of what a page is about), and any time someone shares or references the raw link.

Search engines also give some modest weight to keywords appearing in a URL, though it's a minor ranking factor compared to content quality and backlinks. The bigger, more reliable benefit is human: a clean slug is easier to read, remember, and trust than a string of numbers or an unrelated auto-generated ID.

The mistakes that show up constantly

The most common problem is length — a slug that's just the full title copied verbatim, stop words and all, ending up 90+ characters long. Search engines typically only show so much of a URL in results, and a long slug just gets truncated or ignored.

The second most common problem is broken characters: accented letters, em dashes, or symbols that a naive slug generator either drops entirely (turning "café" into an empty gap) or renders as ugly URL-encoded garbage like %C3%A9. And the third is inconsistency — some pages using hyphens, others using underscores, others jamming words together with no separator at all — which looks unpolished across a whole site even if no individual slug is technically broken.

A simple process for writing a good slug

Start from your page title, then cut it down to the words that actually carry meaning — your target keyword and enough context to be clear, nothing more. "10 Best Coffee Shops in São Paulo (2026 Guide)" can become best-coffee-shops-sao-paulo — the year and "guide" add nothing a search engine or a reader needs from the URL itself.

Drop filler words like "a", "the", "of", and "in" where you can without losing clarity — they add length without adding meaning. Normalize accented characters to their plain equivalent rather than dropping them (café becomes cafe, not an empty gap). And pick one separator — hyphens are the safer, more universally recognized default for SEO — and use it consistently across the whole site.

Doing this at scale, not just one page at a time

The advice above is easy to apply to one blog post. It gets tedious fast if you're migrating a site with hundreds of existing titles, auditing URLs before a redesign, or bulk-importing content into a new CMS. For that, a slug generator with a genuine batch mode — paste in a list of titles, get back a list of slugs, handle duplicates automatically — saves real time over doing it title by title.

Try it yourself

Open Tools Library's Slug Generator handles both cases: a single-title mode with a live URL preview, and a batch mode that takes a whole list of titles at once, automatically de-duplicates repeated slugs, and exports the result as a CSV. It also correctly normalizes accented characters instead of breaking on them — paste in "Café Costa Rica — 20% Off!" and you'll get cafe-costa-rica-20-off, not an empty string.