Hyphens vs Underscores in URLs: Which Should You Use?
If you control a normal public URL and need to separate words in its path, use hyphens by default. Google Search Central currently recommends hyphens instead of underscores for separating words in URLs.
RFC 3986 lists both hyphen and underscore as unreserved URI characters. Technical validity and publishing recommendation are different questions.
Example
- Public-URL default:
summer-clothing - Underscore form:
summer_clothing
Why Mycelgrid offers both
Slug Generator is a text generator, not a publishing policy engine. Underscores can still be useful for filenames, identifiers, or established systems that require them.
Existing conventions can matter more than a new default
Do not rename existing public routes solely to change separators. URL changes can affect links, redirects, analytics, caches, and other site behavior. Mycelgrid does not inspect those dependencies.
What the Tool does
Existing whitespace, hyphens, and underscores become token boundaries. The Tool rejoins the parts with your selected separator, collapses repeated selected separators, and trims selected separators from both ends. It does not publish the result or check route uniqueness.
For the broader slug-writing and publishing review, read What Is a URL Slug? How to Create a Clean, Descriptive Slug.
Try it with the Tool
Turn a title or phrase into a clean URL slug and review the result before using it. Open the Mycelgrid Slug Generator.