Slug Generator (Slugify)

Turn a title, filename, or heading into a clean, URL-safe slug — accents and punctuation are stripped, and spaces collapse into a single separator.

Separator

How it works

The text is Unicode-normalized (NFKD) to split accented letters from their diacritics — e.g. "é" becomes "e" plus a combining accent mark — then the accent marks are stripped, so "Café" slugifies to "cafe" rather than being dropped or mangled. Every run of remaining non-alphanumeric characters (spaces, punctuation, repeated separators) collapses into a single hyphen or underscore, and any leading or trailing separator is trimmed.

Slugs are commonly used for blog post URLs, file names, HTML element IDs, and CSS class names.