Slug Generator
Convert text into URL-friendly slugs
Last updated
Generated Slug:
How to Use This Tool
Enter a title or phrase, generate a slug, then copy it for use in URLs.
When Should You Use This Tool?
Use this for blog posts, product pages, and any clean URL that should be readable and consistent.
See also: Text Formatter, Word Counter .
What is a URL slug?
A slug is the readable part of a URL that names a specific page, such as how-to-bake-bread in example.com/blog/how-to-bake-bread. Good slugs are short, lowercase and separated by hyphens, so people and search engines can tell what the page is about from the address alone. This tool turns a title or phrase into a slug as you type.
How does this slug generator convert text?
The slug updates on every keystroke and follows these rules in this order:
- Accents. Accented Latin letters become plain letters, so é becomes e and ü becomes u. Letters without a separate accent are spelled out: ß becomes ss, æ becomes ae, œ becomes oe, ø becomes o, đ becomes d, ł becomes l and þ becomes th.
- Lowercase. If Convert to lowercase is checked (the default), all letters are lowercased.
- Symbols as words.
&becomes "and", every+becomes "plus", and a#right after a letter becomes "sharp", so "C++" givesc-plus-plusand "C#" givesc-sharp. - Special characters. Any other character that is not an ASCII letter, a digit, an underscore, a space or a hyphen is replaced with a hyphen in normal mode, or deleted in strict mode. Slashes and dots always separate words, in both modes.
- Separators. Every run of spaces, underscores and hyphens is collapsed into a single hyphen.
- Trimming. Hyphens at the start and end are removed.
Click Copy Slug to copy the result. If the text has no Latin letters or digits at all, the tool shows "No Latin letters or numbers to convert" instead of a slug.
What do the generated slugs look like?
These examples show real output from the tool with lowercase turned on:
| Input | Normal mode | Strict mode |
|---|---|---|
| How to Bake Bread: A Beginner's Guide | how-to-bake-bread-a-beginner-s-guide | how-to-bake-bread-a-beginners-guide |
| 10% Off & Free Shipping! | 10-off-and-free-shipping | 10-off-and-free-shipping |
| C++ vs C# in 2026 | c-plus-plus-vs-c-sharp-in-2026 | c-plus-plus-vs-c-sharp-in-2026 |
| red/green | red-green | red-green |
| Version 2.0 | version-2-0 | version-2-0 |
| Café Crème Brûlée | cafe-creme-brulee | cafe-creme-brulee |
| my_file_name | my-file-name | my-file-name |
| 2026-09-28 Release Notes | 2026-09-28-release-notes | 2026-09-28-release-notes |
Notice that &, + and a # after a letter are spelled out as words, so "C++" and "C#" produce different slugs. Other symbols such as %, ! and : are dropped. If you prefer a shorter slug, remove the extra words by hand, for example 10-off-free-shipping.
Should I use normal mode or strict mode?
Use strict mode when punctuation sits inside a word, such as an apostrophe. The difference only matters for characters that touch letters without a space:
- Apostrophes and other punctuation inside words: strict mode gives
beginnersanddont, normal mode givesbeginner-sanddon-t. Strict is usually better for English titles. - Slashes and dots between words: both modes treat them as separators, so "red/green" gives
red-greenand "Version 2.0" givesversion-2-0either way.
For most English titles, strict mode is the better default.
What happens to accented and non-English characters?
Accented Latin letters are converted to plain letters. "Café Crème Brûlée" becomes cafe-creme-brulee in both modes, "Straße" becomes strasse and "Łódź" becomes lodz. Note that ü becomes u, not ue, so for German words where you want ue, oe or ae, type them in yourself.
Text in a non-Latin script, such as Cyrillic, Greek or Japanese, is not transliterated and is removed. If nothing is left, the tool shows "No Latin letters or numbers to convert". Add a Latin spelling of the title to get a slug. Search engines can index URLs with Unicode characters, but they turn into long percent-encoded strings like caf%C3%A9 when copied and shared, so a plain ASCII slug is easier to share.
What makes a good slug for SEO?
A good slug is short, describes the page and uses the words people search for, separated by hyphens. Some practical rules:
- Use hyphens, not underscores. Google's own URL guidelines recommend hyphens to separate words. This tool converts underscores to hyphens automatically.
- Keep it lowercase. Many servers treat
/Aboutand/aboutas different URLs, which can create duplicates. - Cut filler words when the meaning survives.
how-to-bake-bread-a-beginners-guidecan becomebake-bread-beginners-guide. - Leave dates out of evergreen content. A year in the slug makes an updated article look old.
- Do not change published slugs casually. If you must, set up a 301 redirect from the old URL so links and rankings carry over.
How do I generate slugs in code?
This is the same logic the tool runs, so you can reproduce its output in JavaScript:
const extra = { 'ß': 'ss', 'æ': 'ae', 'œ': 'oe', 'ø': 'o', 'đ': 'd', 'ł': 'l', 'þ': 'th' };
function slugify(text, strict = false) {
text = text
.normalize('NFD')
.replace(/[\u0300-\u036f]/g, '')
.toLowerCase()
.replace(/[ßæœøđłþ]/g, ch => extra[ch])
.replace(/([a-z])#/g, '$1 sharp ')
.replace(/\+/g, ' plus ')
.replace(/&/g, ' and ');
if (strict) text = text.replace(/[\/.]/g, ' ');
return text
.replace(/[^\w\s-]/g, strict ? '' : '-')
.replace(/[\s_-]+/g, '-')
.replace(/^-+|-+$/g, '');
}
slugify("10% Off & Free Shipping!"); // "10-off-and-free-shipping"
slugify("Café Crème Brûlée"); // "cafe-creme-brulee"