URL Slug Generator
By Dev Kraken · Updated
Paste a page title and get a clean, lowercase, hyphen-separated URL slug. Handles accents, strips noise, and caps length without cutting words in half. Nothing leaves your browser.
Slug generator
What the generator does
A few inputs and what they become — the rules are deterministic, so the same title always produces the same slug.
| Input | Slug | Why |
|---|---|---|
| 10 Things Every Developer Should Know About TypeScript | 10-things-every-developer-should-know-about-typescript | Numbers are kept; capitals are lowercased; spaces become hyphens. |
| Café & Récette: La Crème Brûlée Parfaite | cafe-recette-la-creme-brulee-parfaite | Accents are stripped via NFKD; the ampersand is collapsed to a separator. |
| Sale!!! 50% Off — Get It While You Can | sale-50-off-get-it-while-you-can | Punctuation runs collapse into a single separator. The em-dash is normalised first. |
| naïve approach to straße names | naive-approach-to-strasse-names | Diaeresis stripped; German ß is transliterated to 'ss' instead of being dropped. |
What makes a good SEO slug
A URL slug is one of the simplest on-page SEO signals — and one of the few you can't easily change later without 301-redirect maintenance. Three rules cover most of the value:
- Put the keyword in. If the page targets "url slug generator", the slug should contain that phrase. Google reads the URL, and so do humans deciding whether to click a result.
- Keep it short. Under 60 characters keeps the full URL visible in search snippets and social previews. Long slugs are also fragile — they're more likely to get truncated mid-word in unexpected contexts.
- Use hyphens. Google treats hyphens as word separators and underscores as joiners — a publicly stated rule since 2008. There's no upside to underscores in URL paths.
What the slug should not contain: dates that you'll have to maintain, session IDs, stop-words that don't carry meaning, and tracking parameters (use the UTM builder for those).
Frequently asked
- What is a URL slug?
- A URL slug is the human-readable part of a URL that identifies a specific page — the part after the domain and any path prefixes. In https://example.com/blog/how-to-write-a-good-slug, the slug is how-to-write-a-good-slug. Good slugs are short, lowercase, hyphen-separated, and contain the target keyword without filler words.
- What makes a slug SEO-friendly?
- Three things, in roughly this order. First, it contains the keyword the page is trying to rank for — Google reads the URL, and so do humans deciding whether to click. Second, it's short — under 60 characters keeps the full URL visible in SERPs and link previews. Third, it uses hyphens (not underscores or spaces) because hyphens are the only word separator search engines have publicly confirmed they treat as a break between words.
- Should I use hyphens or underscores in slugs?
- Hyphens. Google has stated since 2008 that it treats hyphens as word separators and underscores as joiners — so 'url-slug' is read as two words and 'url_slug' as one. The same is true of most modern frameworks and CMSs. Underscores are fine in code identifiers; hyphens are right for URL paths.
- Does this slug generator handle non-English characters?
- Yes. The tool runs Unicode NFKD normalisation, which splits accented characters into a base letter plus a combining mark, then drops the mark — so café becomes cafe, naïve becomes naive, and résumé becomes resume. A small extra table handles characters that don't decompose: German ß becomes ss, Polish ł becomes l, Nordic ø becomes o, and so on.
- What does 'strip stop-words' do?
- When enabled, it drops common short words like 'a', 'an', 'the', 'of', 'and', 'for' from the slug. That tightens long titles ('the-best-way-to-write-a-slug' becomes 'best-way-write-slug') and pushes keywords closer to the start of the URL. Leave it off when stop-words carry real meaning — 'the-godfather' is a movie title that shouldn't become 'godfather'.
- What length should a URL slug be?
- Most SEO style guides recommend under 60 characters for the slug itself and under 90 for the full URL — that's the rough point at which Google starts truncating in search results. The generator caps at 60 by default and never cuts mid-word: it truncates at the last separator before the limit so the slug stays readable.
- How is this different from doing the slug in code?
- Most of the time, you should do it in code — your CMS or static site generator already has a slugify helper. This tool exists for the in-between cases: editing a meta-URL by hand, generating a slug before the page exists in the CMS, sanity-checking a slug another team produced, or porting a title that needs special-character handling that your stack's default helper doesn't do well.
- Is my data sent anywhere?
- No. The generator is a few hundred lines of JavaScript that run in your browser. Once the page has loaded, you can disconnect from the network and it keeps working — nothing is uploaded, logged, or stored.
Related tools
All tools →-
URL Encoder / Decoder
Percent-encode or decode any string — switch between component and full-URL modes.
-
UTM Builder — Campaign URL Builder
Build tagged campaign URLs for GA4 with required-field validation and lowercase warnings.
-
URL Parser
Break any URL into its scheme, host, port, path, query parameters, and fragment.