🔗 Slug Generator
Convert text into SEO-friendly URL slugs instantly. Perfect for creating clean, readable URLs for blog posts, product pages, and web content. Automatically handles special characters, spaces, and formatting.
- Converts text to lowercase letters and numbers only
- Replaces spaces with hyphens (-)
- Removes special characters and punctuation
- Trims leading and trailing hyphens
- Creates URL-safe, SEO-friendly slugs
- Results update in real-time as you type
📝 Examples:
Slug Length: 25
Characters Removed: 7
- Generate SEO-friendly URLs for blog posts
- Create clean product page URLs
- Format category and tag URLs
- Create readable custom URLs for content
- Generate URL-safe identifiers for web applications
- Standardize URL formatting across websites
- Improve URL readability for users and search engines
Three steps, and what they do to accents
The whole slug is built by two substitutions after lowercasing. Every unbroken run of characters that is not a-z or 0-9 turns into a single hyphen, then the hyphens at each end are shaved off:
text.toLowerCase()
.replace(/[^a-z0-9]+/g, "-")
.replace(/^-+|-+$/g, "")
Accented letters are not transliterated - they are stripped like punctuation.
Crème Brûlée: The Best Recipe! comes out as
cr-me-br-l-e-the-best-recipe, not creme-brulee-.... Type
the plain-ASCII spelling yourself and you get the slug you wanted. Text in Greek,
Cyrillic, Arabic or Chinese has no a-z characters at all, so it reduces to nothing
and the output reads "(Empty)".
Writing a slug worth publishing
- Hyphens, never underscores. Google reads a hyphen as a word separator and an underscore as a joiner, so rest_api can be indexed as one word. This tool converts underscores to hyphens for you.
- Short beats complete. Three to five meaningful words is plenty; drop a, the and how to if the slug is running past 60 characters or so.
- Everything else collapses cleanly. Rock & Roll
gives
rock-rollbecause the spaces and ampersand are one run, and $1,299 keeps its digits as1299. - Chars Removed is the difference in length, so it counts the characters that collapsed into hyphens as well as those deleted outright.
Frequently asked questions
What is a URL slug?
The readable part of an address that identifies one page - in
example.com/blog/how-to-bake-bread the slug is
how-to-bake-bread. It tells both readers and search engines what the
page is about before they open it.
Should a slug use hyphens or underscores?
Hyphens. Google has said so since 2007: hyphens separate words, underscores glue them together. Every major CMS defaults to hyphens for the same reason.
How do I make a slug from a title with accents?
Retype the accented letters as their plain equivalents - e as e, o as o - before pasting. This tool drops characters outside a-z and 0-9 rather than converting them, so ñ becomes a hyphen instead of an n.