SEO URL Slug Generator
Turn a headline into a lowercase, hyphenated URL slug. Shorter slugs are easier to share and remember.
Runs in your browser. Nothing you enter is uploaded.
Overview
A slug is the human-readable tail of a URL, and it is one of the few things about a page that is genuinely difficult to change later. Every link anyone has made, every share, every crawl, and every analytics row is keyed to it - so a slug decided carelessly in five seconds becomes a redirect you maintain for years.
This generator converts a headline into a slug: lowercase, hyphen-separated, punctuation removed. Type or paste a title and the result appears immediately, ready to copy into your content management system.
The transformation is a short chain of substitutions, and knowing exactly what it does is worth a minute - because the way it handles accents, ampersands, and emoji is where slugs silently lose meaning.
What the regex does to accents, ampersands, and emoji
The stripping step keeps letters, digits, underscores, whitespace, and hyphens, and deletes everything else. That is the right behaviour for punctuation - commas, colons, question marks, and quotation marks all vanish cleanly - and it has a consequence that catches people out with non-English text: accented characters are outside the kept set, so they are deleted rather than transliterated. "Café" becomes "caf", and "Zürich" becomes "zrich".
Ampersands and plus signs are deleted too, which is usually fine and occasionally destroys the meaning. "Rock & Roll" becomes "rock-roll", which is acceptable. "R&D budget" becomes "rd-budget", which is not. Where the symbol carries meaning, spell it out in the title before generating - "rock and roll", "research and development" - rather than accepting whatever the strip leaves behind.
Emoji are removed entirely, which is the right outcome. Underscores are converted to hyphens, which is also right: hyphens are the conventional word separator in URLs and are treated as separators by search engines, while underscores historically were not. Digits survive, so a year or a version number in the title carries through - which is a reason to think about whether you want it there permanently.
- Accented characters are deleted, not transliterated: "Café" → "caf".
- Ampersands and plus signs are removed - spell them out first if they carry meaning.
- Underscores become hyphens; emoji and punctuation disappear.
- Digits are preserved, including years you may not want to keep.
Choosing slug length before the CMS chooses for you
A slug generated from a full headline is usually too long. "10 Free SEO Tools for Small Business Owners Who Are Just Getting Started" yields a slug of over seventy characters carrying words that do nothing - "who", "are", "just" - and a long URL is displayed truncated in results, harder to share verbally, and no more informative than a short one.
The convention that holds up is three to five meaningful words. "free-seo-tools-small-business" says everything the long version said. Delete stop words, delete the numeral if the count will change, and delete the year unless the page is genuinely an annual edition you will replace rather than update.
The other half of the decision is permanence, and it is the more important half. Once the page is published and linked, changing the slug means either breaking those links or maintaining a redirect indefinitely. So resist encoding anything time-bound: "2026" in a slug commits you to either a stale URL or a migration every January. Generate from the headline, then edit the slug down by hand before you publish rather than after.
The five transformations applied in order
First the input is lowercased and trimmed of leading and trailing whitespace. Second, every character that is not a letter, digit, underscore, whitespace, or hyphen is deleted - this is the step that removes punctuation, symbols, emoji, and accented characters alike. Third, every run of whitespace or underscores is replaced with a single hyphen.
Fourth, any run of consecutive hyphens is collapsed into one, which cleans up the double hyphens produced when punctuation sat between two words and was deleted. Fifth, a leading or trailing hyphen is removed, so a title that began or ended with punctuation does not yield a slug with a dangling separator.
The order matters: because stripping happens before whitespace collapsing, a title like "SEO: tools, tips & tricks" loses the colon, comma, and ampersand first and then has all the resulting whitespace runs collapsed, producing "seo-tools-tips-tricks" rather than a slug with gaps in it. The whole chain is five string operations running locally as you type, with no length limit, no truncation, and no uniqueness check.
A headline with punctuation and a number
Input
10 Free SEO Tools for Small Business - Tested & Ranked in 2026
Output
Generated: 10-free-seo-tools-for-small-business-tested-ranked-in-2026 Edited before publishing: free-seo-tools-small-business
The generated slug is correct and 62 characters long. The em dash and ampersand were removed and the resulting double hyphens collapsed, which is exactly right. The edit is where the value is: the numeral goes because the list will grow, "for" and "in" go because they carry nothing, "tested and ranked" goes because it describes the article rather than identifying the page, and 2026 goes because keeping it commits you to a redirect next year. Twenty-nine characters, same meaning, no expiry date.
Limitations
- Accented and non-Latin characters are deleted rather than transliterated, so non-English titles lose letters or produce empty slugs.
- Ampersands, plus signs, and other meaningful symbols are removed with no substitution, which can change the sense of the slug.
- There is no length limit or truncation - a long headline produces a long slug, and trimming is manual.
- Stop words are kept. "for", "the", and "in" survive and have to be removed by hand.
- No uniqueness check is performed against your existing URLs, so a duplicate slug will not be flagged.
- The tool has no knowledge of your site structure, so it cannot advise on the path or directory the slug should sit under.
When not to use this tool
- For non-Latin scripts, use a transliteration tool first - this generator will delete the characters rather than convert them.
- If the page is already published and linked, changing the slug requires a redirect; the decision is about migration cost, not about generating a better string.
How to use it
- 1
Spell out ampersands and replace accented characters in the title before generating, since both are deleted rather than converted.
- 2
Generate from the full headline to get a clean starting string.
- 3
Edit it down to three to five meaningful words, removing stop words, numerals that will change, and any year.
- 4
Confirm the slug is not already in use on your site, then publish - and treat it as permanent from that point.
Questions
How long should a slug be?
Three to five meaningful words is the range that stays readable, shareable, and fully visible in search results. Beyond that you gain no additional signal - search engines do not reward keyword repetition in a URL - and you lose legibility everywhere the URL is displayed.
Hyphens or underscores?
Hyphens. They are the long-standing convention for word separation in URLs and are treated as word boundaries, whereas underscores historically were not. This generator converts underscores to hyphens for exactly that reason.
Should I include the date or year?
Only if the page is genuinely a dated edition you will replace rather than update. A year in the slug commits you to a stale URL or an annual redirect, and the publication date is better expressed in the page metadata where it can change without breaking anything.
What happens if I change a slug after publishing?
Every existing link to the old URL breaks unless you add a 301 redirect from the old slug to the new one, and even with a redirect in place there is a transitional period while search engines reprocess the change. It is doable and it is not free, which is the argument for editing the slug before you publish.
Related tools
Related tools
