Z

Slug Generator

Turn any title into a clean, URL-friendly slug. Removes accents and punctuation; runs in your browser.

Runs in your browser — files never leave your device

Input
Output

How it works

A slug is the human-readable part of a URL — the-post-title in example.com/blog/the-post-title. Type or paste a title and this tool produces a clean, URL-safe slug in your choice of hyphen or underscore separators, updating as you type.

The transformation follows five fixed steps, in order. The text is Unicode-normalized (NFKD), which splits accented letters into a base letter plus a combining mark and converts compatibility characters such as superscripts into plain forms. The combining marks are stripped, so é becomes e, ü becomes u and ñ becomes n. Everything is lowercased. Then every run of characters other than a–z and 0–9 — spaces, punctuation, symbols, emoji — collapses into a single separator. Finally, separators at the start and end are trimmed away.

A concrete example: 10 Tips & Tricks for Café Owners! becomes 10-tips-tricks-for-cafe-owners in hyphen mode and 10_tips_tricks_for_cafe_owners with underscores. The é lost its accent, the ampersand collapsed into a single separator along with its surrounding spaces, and the trailing exclamation mark disappeared entirely.

Use hyphenated slugs for blog-post and product URLs — Google’s documentation recommends hyphens as word separators in URLs, and readable slugs help both visitors and search snippets. Underscore mode suits file names, database identifiers and analytics event names, where snake_case is the convention. The same rules also produce good anchor IDs and image file names.

The gotchas all involve characters that don’t decompose to a–z. Letters like ß and ø have no combining-mark form, so they are dropped and leave a separator behind: Straße becomes stra-e and Smørrebrød becomes sm-rrebr-d — worth a quick manual fix (strasse, smorrebrod). Non-Latin scripts are removed entirely, so transliterate first. And apostrophes count as separators: What’s New in Next.js 15? becomes what-s-new-in-next-js-15.

Frequently asked questions

Should I use hyphens or underscores in URLs?
Hyphens. Google’s documentation recommends hyphens as word separators in URLs because they are read as spaces between words, while underscores historically joined words together. Underscores remain a fine choice for file names, database fields and code identifiers, which is why both modes are offered.
What happens to accented letters?
Letters with combining accents are reduced to their base letter through Unicode NFKD normalization — é becomes e, ü becomes u, ñ becomes n — so Crème brûlée — über alles slugs to creme-brulee-uber-alles. Letters without a decomposition, such as ß and ø, cannot be converted this way and are dropped instead, leaving a separator in their place.
Does it work with non-Latin scripts?
No — the final slug may contain only a–z, 0–9 and the separator, so Cyrillic, CJK, Devanagari and similar scripts are removed completely. Привет мир produces an empty result. Transliterate the title into Latin letters first if you need a slug from those languages.
Are numbers kept?
Yes, digits pass straight through, and NFKD normalization even converts superscript digits into plain ones — E = mc² becomes e-mc2. That keeps years, versions and quantities readable in the slug.
What about repeated spaces and punctuation?
Any run of non-alphanumeric characters, however long, collapses into a single separator, and separators at the ends are trimmed. " --Hello,,, World!! " slugs to plain hello-world with no doubled or trailing hyphens.
Is my text uploaded?
No — the slug is computed in your browser as you type and nothing is sent anywhere. The same slugify logic is shared with the ZoolTools mobile app and validated against common test vectors.