Utilumo
LightDarkSystem
Explainer1 min readUpdated June 29, 2026

What is a URL slug?

Short answer

A URL slug is the human-readable part of a web address that identifies a specific page, usually lowercase words joined by hyphens. In /learn/what-is-a-url-slug, the slug is what-is-a-url-slug.

Where the slug sits

The slug is the last, descriptive segment of a URL's path. It is meant to be read by people and search engines, so a clear slug like png-vs-jpg is far better than an opaque one like ?id=4827. See also The anatomy of a URL.

What makes a good slug

  • Lowercase, since URLs can be case-sensitive on some servers
  • Words separated by hyphens, not spaces or underscores
  • Short and descriptive, focused on the page's main topic
  • No accents or special characters, which get percent-encoded and look messy
  • Stable: avoid changing a slug after publishing, or set up a redirect if you must
"How to Compress Images!"  ->  how-to-compress-images
Turning a title into a slug
Try it: Slug GeneratorTurn any title into a clean, URL-safe slug locally.Open tool
Why hyphens, not underscoresSearch engines treat hyphens as word separators but may read underscores as joining words together, so png-vs-jpg is clearer than png_vs_jpg.

References

Questions

Why are spaces not allowed in a slug?

A space in a URL is encoded as %20, which is ugly and harder to read. Hyphens keep the slug clean while still separating words.

Should a slug match the page title exactly?

It should reflect the topic, but shorter is often better. Drop filler words like 'the' and 'a' and keep the keywords that describe the page.

Does the slug generator upload my text?

No. Slugs are generated locally in your browser and your text is never uploaded.

Keep reading