Dev · Live
Text to Slug Converter,
URL-safe slugs in an instant.
Transform any string into a clean, URL-friendly slug — lowercase, hyphenated, and special-character-free. Supports Unicode normalization, stop-word removal, and custom separators. Fully client-side, real-time.
Input
Your text
Options
Separator
a, the, and, or, for…
Try an example
Output
Your slug
Start typing above to see your slug…
Slug rules
- ✓Only lowercase letters (a–z)
- ✓Only digits (0–9)
- ✓Hyphens or underscores as separators
- ✗Spaces — replaced with separator
- ✗Special chars: ! @ # $ % ^ & *
- ✗Leading or trailing separators
- ✗Consecutive separators (--)
- ✗Uppercase letters (bad for SEO)
Slug guide
What is a URL slug and why does it matter for SEO?
What is a URL slug?
A URL slug is the human-readable part of a web address that identifies a specific page. In the URL https://example.com/blog/how-to-write-seo-slugs, the slug is how-to-write-seo-slugs. It appears at the end of the URL path and describes the content of the page in a concise, hyphenated phrase.
The term "slug" originates from print journalism, where it referred to a short internal name given to a story. In web development, the concept was popularised by content management systems like WordPress and Django, which automatically generate slugs from post titles.
Why URL slugs matter for SEO
Search engines use URL structure as a ranking signal. A clean, descriptive slug that includes the page's primary keyword reinforces topical relevance and helps search engines understand the content before reading a single word of body text.
Google's John Mueller has confirmed that keywords in URLs provide a minor but real ranking signal. More importantly, a readable URL improves click-through rates (CTR) from search results — users are more likely to click /blog/best-running-shoes-2026 than /p?id=8f3a2b&ref=home.
- Keyword relevance: Include your primary keyword naturally. Avoid keyword stuffing — one focused phrase is always better than five crammed-together terms.
- Readability: A human should understand what the page is about just from the slug. If you need to explain the URL, it is too complex.
- Stability: Changing a slug after publication breaks existing links, social shares, and backlinks unless you set up a 301 redirect. Get it right the first time.
- Length: Keep slugs concise — ideally under 60 characters. Long slugs can be truncated in search results and are harder to share.
Hyphens vs. underscores: which separator to use?
Google has historically treated hyphens as word separators, so best-running-shoes is read as three separate words. Underscores were treated as joining characters, making best_running_shoes a single token. Google has since updated its handling of underscores, but the industry standard remains hyphens.
Use underscores only if your framework convention specifically requires them — for example, some Python/Django projects prefer underscores to match their file naming style.
Stop words: should you remove them?
Stop words are common articles, conjunctions, and prepositions — "a", "the", "and", "or", "for", "in". Removing them shortens the slug and keeps it focused on meaningful keywords.
For example, "The Best Guide to Writing URLs for SEO" without stop words becomes best-guide-writing-urls-seo instead of the-best-guide-to-writing-urls-for-seo. The shorter version is cleaner and still conveys the same meaning to both humans and search engines.
That said, do not remove stop words if they are part of the essential meaning. "How to" is a meaningful phrase in a how-to guide — removing "to" produces the awkward how-write-urls. Use your judgment.
Unicode and international characters
Non-ASCII characters (accented letters, CJK characters, Arabic script) are technically allowed in URLs through percent-encoding, but they create practical problems:
- Copy-paste corruption: Many email clients and CMS fields incorrectly encode or truncate non-ASCII URLs.
- Rendering inconsistency: Different browsers display percent-encoded URLs differently — some show the raw encoded form, others the decoded characters.
- Backlink fragility: External sites may double-encode the URL, causing broken links.
The safest approach is to transliterate accented characters to their ASCII equivalents via Unicode normalization (NFD decomposition followed by stripping diacritical marks). This converter handles that automatically — "Découvrir" becomes decouvrir.
Best practices for writing URL slugs
- Always use lowercase — URLs are case-sensitive on most Linux servers.
- Use hyphens, not underscores or spaces.
- Include your primary keyword, ideally at the start of the slug.
- Omit dates unless freshness is critical (they age poorly and lock you into updating the URL).
- Do not repeat the category in the slug if it is already in the URL path.
- Set up 301 redirects immediately if you must change a live slug.