Use Slug Validator

Enter your data below to use the Slug Validator

📌 Try these examples:
RESULT

Last updated

Slug Rules Summary

Slug Migration Checklist

When changing an existing slug, always set up a 301 redirect from the old URL to the new one:

# Nginx redirect
location = /old-slug {
  return 301 /new-slug;
}

# Apache .htaccess
Redirect 301 /old-slug /new-slug

# Next.js redirects in next.config.js
module.exports = {
  async redirects() {
    return [
      { source: '/old-slug', destination: '/new-slug', permanent: true }
    ];
  }
};

Examples

Example 1: Valid Slugs

✓ getting-started-with-react
✓ how-to-build-a-rest-api
✓ product-name-blue-xl
✓ 10-tips-for-better-code
✓ javascript-array-methods
✓ contact-us
✓ about

Example 2: Common Validation Errors and Fixes

INVALID: "Getting Started With React"
Issues: uppercase letters, spaces
Fixed:  "getting-started-with-react"

INVALID: "how_to_build_a_REST_API"
Issues: underscores, uppercase letters
Fixed:  "how-to-build-a-rest-api"

INVALID: "product--name--here"
Issues: multiple consecutive hyphens
Fixed:  "product-name-here"

INVALID: "-leading-hyphen"
Issues: leading hyphen
Fixed:  "leading-hyphen"

INVALID: "trailing-hyphen-"
Issues: trailing hyphen
Fixed:  "trailing-hyphen"

INVALID: "what's-new-in-2026?"
Issues: apostrophe, question mark (special characters)
Fixed:  "whats-new-in-2026"

INVALID: "café-au-lait"
Issues: non-ASCII character (é)
Fixed:  "cafe-au-lait"  (transliterated)
   or:  "caf%C3%A9-au-lait"  (percent-encoded — less readable)

Example 3: SEO Best Practice Checks

Slug: "the-best-way-to-learn-javascript-programming-for-beginners-in-2026"
Length: 68 characters
Warning: Slug is too long (over 60 characters). Consider shortening.
Suggestion: "learn-javascript-for-beginners-2026"

Slug: "a"
Length: 1 character
Warning: Slug is too short to be descriptive.
Suggestion: Use at least 3 characters.

Slug: "the-a-and-of-in-to"
Warning: Slug consists mostly of stop words with no meaningful keywords.
Suggestion: Remove stop words and focus on the key topic.

Frequently Asked Questions

Simply enter your data, click the process button, and get instant results. All processing happens in your browser for maximum privacy and security.

Yes! Slug Validator is completely free to use with no registration required. All processing is done client-side in your browser.

Absolutely! All processing happens locally in your browser. Your data never leaves your device, ensuring complete privacy and security.