Advertisement
Separator
Case
Max length
Slug
Advertisement

Frequently Asked Questions

What is a slug?

A slug is the URL-friendly version of a string. It typically contains only lowercase letters, numbers, and hyphens. For example, the title "Hello World!" becomes the slug "hello-world". Slugs are used in blog post URLs, product pages, and any route where a human-readable identifier is needed.

How are accented characters handled?

Accented and special characters are transliterated to their closest ASCII equivalent before slugging. For example, é → e, ñ → n, ü → u, ø → o. This ensures the slug remains URL-safe without percent-encoding.

When should I use underscore instead of hyphen?

Hyphens are recommended for most web URLs — search engines treat hyphens as word separators, which is better for SEO. Underscores are common in database identifiers, Python variable names, and some legacy systems.