What is a slug?

A slug is the readable part of a web address that names one page, such as summer-picnic-ideas in example.com/blog/summer-picnic-ideas. Blogs, online shops and content management systems make one from each page title: small letters and digits, with hyphens between the words and everything else left out. Slugs keep addresses short, easy to read and safe to share, since they need no percent-encoding.

You need a valid one when you set the address of a new post or product by hand, move pages from one system to another, or build a form or an API that lets people pick their own address. A capital letter, a space or a stray hyphen can lead to broken links or to two addresses for the same page.

Tool description

Type or paste a slug into the Slug field, and the result shows as you type: "Slug is valid" or "Slug is not valid". Spaces and line breaks around a pasted slug are ignored. The page has no settings: it checks the rules below.

Slugs that pass

  • Small letters from a to z and digits: summer-picnic-2025
  • Words joined by hyphens or underscores, or both in one slug: garden_party, lemon-cake_recipe
  • A single letter or digit, or digits alone: a, 2025
  • Long slugs too, since the check doesn't look at the length

Slugs that fail

  • Capital letters: Summer-Picnic
  • A hyphen or underscore at the start or the end: -picnic, picnic-
  • Two separators in a row, even a hyphen next to an underscore: summer--picnic, summer-_picnic
  • Spaces, dots, slashes and other punctuation: summer picnic, birthday-cake.html, blog/summer-picnic
  • Letters with accents, letters of other alphabets and emoji: café-menu fails, while cafe-menu passes

Good to know

  • The check looks at the characters only. It can't tell whether a page with that slug exists, or whether the slug is already taken on your site.
  • It checks one slug at a time: a path with slashes fails, so check each part on its own.
  • To turn a title into a slug, use the URL Slug Generator. With its default settings it writes accented letters as plain ones, so café becomes cafe. To check a whole web address, use the URL Validator.

Features

  • Checks URL slugs as you type
  • Small letters, digits, hyphens and underscores
  • Catches doubled separators and separators at either end
  • Ignores spaces around a pasted slug
  • Runs in your browser, so nothing you type is sent anywhere