Slugify Online — URL Slug Generator

Turn any title or label into a URL-safe slug. Pick hyphen or underscore separators, casing, max length, and whether to strip accents — free and browser-local.

Loading…
Slugify — developer notes
Build URL-safe slugs from titles: strip diacritics via NFD, replace non-alphanumerics, collapse separators, apply casing, and truncate cleanly.

How slugify works

Pipeline: trim → optional diacritic strip (NFD) → non-alphanumeric → separator → collapse → trim edges → casing → max-length truncate on a separator boundary. Without diacritic stripping, non-ASCII letters become separators (ASCII-focused sanitize).

Options

Separator (- / _)
Hyphens for typical URL paths; underscores when you need identifier-style slugs.
Casing (lower / upper / preserve)
Lowercase is the web default; upper helps constants; preserve keeps original letter case after sanitize.
Max length (0 / 50 / 80 / 120)
0 means unlimited. Truncation prefers cutting on a separator so you do not leave a trailing separator.
Strip diacritics
On by default — é becomes e via Unicode NFD. Turn off only if you accept ASCII-only sanitize dropping accents.

Examples

French title

Input

Café Déjà Vu!

Slug

cafe-deja-vu

Underscore + upper

Input

Hello World (separator _, upper)

Slug

HELLO_WORLD

Related utilities

Encode URL components with URL encode, or test patterns with the regex tester.

Slugify FAQ

URL slug questions

Does it transliterate German ß → ss?

No. v1 uses Unicode NFD diacritic stripping plus ASCII sanitize — not locale-specific transliteration tables.

What happens with empty input?

You get an empty slug string.

Is the slug uploaded?

No — conversion stays in your browser.

Why truncate on separators?

Cutting mid-word looks ugly in URLs; preferring a separator keeps the last token whole when possible.

Looking for converters, encoders, formatters, and minifiers in one place? Developer tools hub Open the curated developer tools catalogue.