Slug Generator
What is a URL slug?
A slug is the readable, URL-safe part of a web address that identifies a specific page — for example, the "how-to-build-a-website" part of example.com/blog/how-to-build-a-website. Good slugs are short, lowercase, hyphen-separated, and free of special characters.
When would I use this?
- Turning a blog post title into a clean URL slug.
- Generating a URL-safe identifier from a product name or category title.
- Creating a consistent, readable key for a CMS entry or file name.
How it works
Your text is normalized, accented characters are converted to plain ASCII, invalid characters are stripped, and remaining words are joined with your chosen separator — all in JavaScript, in your browser.
Frequently asked questions
A slug is the URL-friendly version of a title or phrase — lowercase, with spaces and special characters replaced by hyphens, commonly used in blog post URLs, product pages, and API resource identifiers.
Accented characters (like é or ñ) are converted to their closest plain ASCII equivalent, and any character that isn't a letter, number, or hyphen is stripped or replaced with a hyphen.
Yes, multiple consecutive separators are collapsed into a single hyphen, and leading/trailing hyphens are trimmed automatically.
No, slug generation happens entirely in your browser using JavaScript.
Related tools
Regex Tester
Test and debug regular expressions with live match highlighting.
Lorem Ipsum Generator
Generate placeholder text by paragraphs, sentences, or words.
Markdown Previewer
Write Markdown and see the rendered HTML side by side, live.
Diff Checker
Compare two blocks of text and see exactly what changed.