URL Slug Generator
Generate URL-friendly slugs.
About this tool
Paste a post title and press Run to get a URL-safe slug: lowercase words joined by single hyphens, with accents removed and punctuation dropped.
How to use
How it works
Accented letters are decomposed and their marks removed, so é becomes e, and ß, æ, œ, ø, ł, đ and þ are replaced with ss, ae, oe, o, l, d and th. Anything that is not a letter, digit, space, underscore or hyphen turns into a space, whitespace and underscores collapse to one hyphen, and leading or trailing hyphens are trimmed.
Worked example
A title with accents and symbols
- Input
- Café Münster: Top 10 Tips & Tricks!
- Output
- cafe-munster-top-10-tips-tricks
- Walkthrough
- Accents are stripped, the colon, ampersand and exclamation mark are dropped, and the words are joined with hyphens.
Limitations
- Letters outside the Latin alphabet are removed: a title in Japanese or Arabic script produces an empty or partial slug.
- The separator is always a hyphen and there is no length limit option.
- Does not check whether the slug is already used.
Questions
What is a URL slug?
Does it remove accents?
What happens to non-Latin text?
Can I use underscores instead of hyphens?
Features
- Strips accents
- Single hyphens, no edge hyphens
- Runs in your browser
Related resources
Guides and videos from around the web—opens on YouTube or the publisher’s site.
Learn Regular Expressions - Crash Course
freeCodeCamp.org
Regex powers many find/replace and clean-text workflows.
Watch on YouTubeLearn JSON - Full Crash Course
freeCodeCamp.org
Structured text formats often sit next to plain-text tools.
Watch on YouTube
- String
MDN
JS string methods that mirror case, trim, and split tools.
- UTF-8 and BOM
W3C
Encoding gotchas when cleaning pasted text.