URL Slug Validator
Check whether a string is a valid, URL-safe slug and get a corrected suggestion if not.
How this tool works
Paste the slug
A string generated by your CMS, or one you wrote by hand.
Rules are checked in order
Lowercase, allowed characters, and hyphen placement are each verified individually.
See exactly what failed
The first broken rule is named specifically, not just a generic "invalid slug" message.
Use the suggested fix
A corrected, URL-safe version is generated automatically if the input doesn’t pass.
Quick facts
- Category
- Validators
- Best for
- Checking a CMS-generated slug before publishing a URL
About this tool
Paste a string to check it against the rules a URL-safe slug needs to follow: lowercase letters, numbers, and hyphens only, with no leading, trailing, or consecutive hyphens, and no spaces or special characters. Rather than a single pass/fail verdict, the validator checks each rule in a specific order so the message tells you exactly which one failed first - an uppercase letter, a leading hyphen, a double hyphen - instead of a generic "invalid slug." Whenever the input doesn’t pass, a corrected suggestion is generated automatically by lowercasing the text, stripping special characters, and collapsing whitespace and repeated hyphens into single hyphens, so you get a usable slug to copy instead of having to fix it by hand. Runs entirely client-side.
Why use this tool
Names the specific failure
Tells you exactly which rule broke - a capital letter, a double hyphen - instead of a generic error.
Auto-generates a fix
A valid slug suggestion is built automatically whenever the input doesn’t pass.
Checks every rule that matters
Lowercase, allowed characters, and leading/trailing/double hyphens are all covered.
Catches CMS quirks
Useful for spotting slugs an auto-generator got wrong before they go live in a URL.
Frequently asked questions
Slugs are meant to be a canonical, predictable identifier for a URL path segment, and mixing letter case introduces ambiguity - some web servers treat URLs as case-sensitive and others don’t, so "My-Post" and "my-post" could either be the same page or two different ones depending on server configuration. Enforcing lowercase-only removes that ambiguity entirely.
Any character that isn’t a lowercase letter, digit, space, or hyphen is stripped out entirely during suggestion generation - so an apostrophe in "don't" is simply removed rather than transliterated, and an accented character like "é" is dropped rather than converted to its unaccented equivalent. For text with heavy use of accented characters, you may want to review the suggested slug rather than using it as-is.
Explore more free tools
Formatters, converters, validators, and generators - all free and running entirely in your browser.
Browse more tools