Runs 100% in your browser — nothing is uploaded
Text & String

Slug Generator

Turn any title into a clean, URL-safe slug — lowercase, hyphenated, and accent-free.

Slug Generator
Client-side

About this tool

The Slug Generator converts any string of text — a blog post title, product name, or page heading — into a clean, URL-safe slug suitable for use in a route path. It lowercases the text, replaces spaces and underscores with your chosen separator, strips characters that aren't alphanumeric or the separator, collapses repeated separators into one, and trims any leading or trailing separator characters.

A common gotcha with slug generation is accented and non-Latin characters: "Pokémon" naively slugifies to "pok-mon" if the é is simply stripped. This tool includes an optional transliteration step that decomposes accented characters into their base letter plus a combining diacritical mark, then strips the mark — so é becomes e, ñ becomes n — before the rest of the slugification runs.

Options let you choose hyphens or underscores as the separator (hyphens are the SEO-standard convention), toggle lowercasing on or off, and toggle transliteration independently.

This is the exact kind of transformation frameworks like Next.js, WordPress, and Shopify perform automatically when you save a post — this tool lets you preview or generate that slug manually, entirely in your browser.

FAQ

Why does my title with accented characters look wrong?
Without transliteration, accented characters like é or ñ are simply removed, leaving gaps. Turn on the transliteration toggle to convert accented letters to their closest plain-ASCII equivalent before slugifying.
Should I use hyphens or underscores in URL slugs?
Hyphens are the widely accepted standard — Google and most SEO guidance treat hyphens as word separators, while underscores can sometimes be interpreted as joining words together.
What happens to numbers and existing hyphens in my input?
Numbers are preserved as-is. Existing hyphens or underscores are normalized to your chosen separator, and repeated separators are collapsed into one.
Can a slug end up empty?
Yes, if the input is made up entirely of characters that get stripped. The tool detects this and returns an error rather than silently producing a blank slug.
Does this tool guarantee my slug is unique?
No. It is purely a text transformation — it does not check against a database or existing URLs. Uniqueness enforcement is the responsibility of your application or CMS.