URL slug generator
Clean, ASCII-safe slug for URLs and filenames.
A URL Slug Generator produces a url slug on demand, using a deterministic algorithm or a cryptographically strong random source. Output is generated entirely in your browser so nothing is sent to a server. Turn 'Hello, World!. The tool runs.
Clean, ASCII-safe slug for URLs and filenames.
Convert any title into a clean, SEO-friendly URL slug. Lowercase, hyphenated, ASCII-only.
Paste a title or sentence. The tool lowercases, transliterates accented characters to ASCII, replaces non-alphanumeric runs with hyphens, and trims edge hyphens. Output is safe to use as a URL path segment.
This tool runs 100% in your browser - the libraries load from a public CDN and the math runs on your device. Nothing is uploaded to a server. The underlying logic is:
1. NFKD-normalize and strip combining marks 2. lowercase 3. replace non-alphanumeric runs with '-' 4. trim leading/trailing '-'
You can verify by opening the browser developer tools and watching the Network tab; you'll see no requests fired during normal use beyond the initial page and library load.
A slug is the human-readable part of a URL path that identifies a page, the "url-slug-generator" in this page's address. A good slug is short, lowercase, hyphen-separated, and built only from unreserved ASCII characters so it survives copying, sharing, and indexing without being percent-encoded into noise.
| Title | Good slug | Why |
|---|---|---|
| 10 Best Cafes in San Jose! | best-cafes-san-jose | Dropped the number-as-filler, stop word "in", and punctuation |
| Café Résumé Tips | cafe-resume-tips | Accents transliterated to ASCII (é becomes e) |
| C++ vs Rust: A Comparison | c-vs-rust-a-comparison | Symbols collapsed to single hyphens, no leading or trailing dash |
| Spaced Out | spaced-out | Whitespace runs collapsed, edges trimmed |
The tool applies a deterministic pipeline. Each step removes a class of URL-unsafe characters until only lowercase letters, digits, and hyphens remain:
1. NFKD-normalize, then strip combining marks (café -> cafe)
2. lowercase everything (Hello -> hello)
3. replace every run of non-alphanumeric with - ("a, b" -> a-b)
4. collapse repeated hyphens to one (a--b -> a-b)
5. trim leading and trailing hyphens (-a-b- -> a-b)
Because the steps are pure transforms, the same input always yields the same slug, which is what makes slugs safe to use as stable, canonical URLs. Optionally you can also strip common stop words (a, an, the, in, of, and) and cap the length so very long titles do not produce unwieldy paths.
best-cafes-san-jose tells both readers and search engines what the page is about; padding it with numbers and stop words dilutes that signal.red_shoes can read as one token while red-shoes reads as two./About and /about as different URLs, which fragments links and analytics; an all-lowercase slug avoids duplicate-content traps.café becomes the percent-encoded caf%C3%A9 in the URL, which is ugly and easy to mangle when shared.%20 and mixed case can create duplicate URLs; always lowercase and hyphenate.A slug is the readable identifier in a URL path that names a specific page, such as "url-slug-generator" in this page's address. It is built from lowercase letters, digits, and hyphens so the URL stays clean, shareable, and indexable without percent-encoding.
Hyphens. Search engines treat a hyphen as a word separator, so "red-shoes" reads as two words, while an underscore joins them, so "red_shoes" can read as a single token. The hyphen is the long-standing convention for SEO-friendly slugs.
It NFKD-normalizes the text and strips combining marks, so accented letters transliterate to their ASCII base: "café" becomes "cafe" and "résumé" becomes "resume". This keeps the slug ASCII-only and avoids the percent-encoded mess that raw accents produce in a URL.
You can, but every existing link and bookmark to the old slug will break unless you add a 301 redirect from the old path to the new one. Changing a live slug also resets any search ranking the old URL had accumulated, so do it deliberately, not casually.
Short enough to read at a glance, ideally under about 60 characters. Keep the core keywords and drop stop words and filler. A slug that echoes a full headline is hard to share and adds no value; "best-cafes-san-jose" beats "the-10-best-cafes-to-visit-in-san-jose-this-year".