Validate slug

Check whether a URL slug uses lowercase letters, numbers, and safe hyphens.

freeworks offlinenothing uploaded
ToolSlug Validator
Input
Output

How it works

The string is trimmed and checked for lowercase ASCII letters, digits, single hyphens, and non-empty boundaries. Separate findings identify uppercase characters, whitespace, punctuation, edge hyphens, and doubled hyphens.

  • Lowercase ASCII avoids case-sensitive duplicate paths.
  • Every detected issue is reported together.

Worked example

Valid Slug
Validate a well-formed URL slug
Input
											my-awesome-blog-post
										
Output
												Valid slug: my-awesome-blog-post
											

When to use this

CMS permalinks, static-site routes, and SEO URL audits validate slugs.

Edge cases

  • Accented characters are rejected rather than transliterated.
  • A leading or trailing hyphen is invalid even though internal hyphens are allowed.
  • Adjacent hyphens are reported separately from other punctuation.