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.
Key takeaways
- A slug is the only part of a URL you fully control — and search engines give it modest ranking weight.
- The most common slug mistakes: too long, broken accented characters, inconsistent separators.
- Cut to the words that carry meaning; drop filler words like "a", "the", "of".
- Normalize accents (café → cafe) instead of dropping them or leaving broken encoding.
- Batch tools save real time when renaming URLs at scale — a migration, redesign, or bulk import.
The one part of your URL you actually control
Domain names cost money and take planning. Page content takes real work. But the slug — the part of a URL after the last slash — is something you write in about ten seconds, and it's easy to treat as an afterthought since most CMS platforms generate one automatically from your title.
That's a missed opportunity. 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 (the only always-visible summary of what a page is about), and any time someone shares or references the raw link.
“Search engines give modest ranking weight to keywords in a URL — the bigger, more reliable benefit is human: people trust a clean URL more than a string of numbers.”
The three mistakes that show up constantly
In roughly this order of frequency:
- Too long — the full title copied verbatim, stop words and all, running 90+ characters. Search results truncate it anyway.
- Broken characters — accented letters or symbols that get dropped entirely ("café" → empty gap) or turned into %C3%A9-style garbage.
- Inconsistent separators — hyphens on some pages, underscores or nothing on others, looking unpolished across a site.
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. Normalize accented characters to their plain equivalent rather than dropping them. 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.
Mentioned in this post
Case Converter
Convert text into 14 case formats simultaneously — UPPERCASE, Title Case, camelCase, snake_case, kebab-case, and more — each with its own instant copy button.
Slug Generator
Convert titles into clean, URL-safe slugs with accent handling, stop-word removal, and length control — plus a batch mode that slugifies an entire list at once and exports it as a CSV.
Frequently asked questions
Do URL slugs actually affect SEO rankings?
Modestly. Keywords in a URL are a minor ranking signal compared to content quality and backlinks, but a clean slug also improves click-through rate from search results, which is a real, measurable benefit.
Should I use hyphens or underscores in a slug?
Hyphens. Search engines reliably treat them as word separators; underscores are sometimes read as joining words together instead of separating them.
What should I do with accented characters like café or naïve?
Normalize them to their plain-letter equivalent (café → cafe) rather than dropping them or leaving broken URL-encoded characters.
How long should a slug be?
Short enough to stay meaningful and fully visible in search results — typically well under 60 characters, cutting filler words rather than truncating mid-word.