Write a good URL slug: separators and stopwords
Turn any string into a clean, URL-safe slug. Handles accents, emoji, and separators.
Why slug quality matters for SEO
A URL slug is often the first signal search engines and readers see for a page. Clean, meaningful slugs improve click-through, shareability, and indexing. This guide covers the choices our generator exposes and when to use each.
Transliteration (NFKD)
Accented characters (é, ü, ñ) are converted to their unaccented ASCII equivalents before slugging — this uses Unicode NFKD normalization under the hood and strips combining marks. This turns Café résumé into cafe-resume. If you need to preserve accents (rare), generate the slug then post-process.
Separators
- Hyphen (
-) — the web default. Google treats it as a word separator; recommended for almost all cases. - Underscore (
_) — treated as a word-join, not a word-break, by Google (per Google Search Central guidance). Avoid for URLs unless you have a specific reason (file names, e.g.). - Dot (
.) — valid but reads like a file extension; usually a bad choice for SEO. - None — produces
thequickbrownfox. Useful for hashtag-style identifiers or fixed-format codes, rarely for URLs.
Stopwords
Stripping common stopwords (the, and, of, to …) produces shorter slugs like quick-brown-fox from the quick brown fox. Good for long titles. Leave off if preserving the exact title is important for brand reasons.
Length cap
We cap at 60 characters by default and break on a word boundary. Google has historically indexed slugs up to ~200 characters, but shorter slugs get higher click-through and look cleaner in previews.
What we strip
Anything that isn't a letter or number — punctuation, emoji, control characters, whitespace runs — is collapsed into a single separator. That makes the output safe for any URL path component.