Slug generator
Turn a headline into a clean URL slug: lowercase, no accents or special characters, words joined by hyphens. Set a maximum length if you need one. The headline stays in your browser and nothing is uploaded, so you can prepare slugs for unpublished posts.
How it works
-
Paste your text
Type or paste the text in the left box, or open a .txt file. No text to hand? Click Example.
-
Instant result
The result appears as you type. Change the options and see straight away what changes.
-
Copy or download
Copy the result with one click, save it as a file or use it as input for a next step.
Example
One café & 10 tips for a better website! becomes one-cafe-and-10-tips-for-a-better-website.
- Accents are removed (
cafébecomescafe) and&becomesand. - Punctuation and symbols disappear.
- Choose a hyphen (best for URLs) or an underscore as separator.
- Set a maximum length (0 means no limit): the slug is cut at a whole word, never in the middle of one.
- Paste a list and every line becomes its own slug.
Good slugs
Search engines read hyphens as word separators, so my-first-post is preferred over my_first_post. Keep slugs short and descriptive, and don't change a slug once the page is live without setting up a redirect.
Letters from other languages
Accented Latin letters lose their accent and common special letters are transcribed: Straße in München becomes strasse-in-munchen and Łódź becomes lodz. If you only need to remove accents without changing anything else, use remove accents; to strip punctuation, remove special characters.
Code identifiers
For code identifiers rather than URLs, use kebab case or snake case.
Frequently asked questions
What is a slug?
The part of a URL that names the page, such as `one-cafe-and-10-tips` in `example.com/blog/one-cafe-and-10-tips`. A good slug is short, lowercase and readable.
Hyphen or underscore?
Hyphens. Search engines treat a hyphen as a space between words, while an underscore joins them, so `my-first-post` is read as three words and `my_first_post` as one. The underscore option is there for file names and code.
How does the maximum length work?
The slug is cut at a whole word, never in the middle of one. With a maximum of 30, a long title becomes `this-is-a-rather-long-title` (27 characters) instead of ending in half a word.
Should I change a slug after publishing?
Avoid it. Links and search results point to the old URL. If you must change it, set up a permanent redirect from the old slug to the new one.