🔍

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:

  1. 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.
  2. Lowercase. If Convert to lowercase is checked (the default), all letters are lowercased.
  3. Symbols as words. & becomes "and", every + becomes "plus", and a # right after a letter becomes "sharp", so "C++" gives c-plus-plus and "C#" gives c-sharp.
  4. 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.
  5. Separators. Every run of spaces, underscores and hyphens is collapsed into a single hyphen.
  6. 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:

InputNormal modeStrict mode
How to Bake Bread: A Beginner's Guidehow-to-bake-bread-a-beginner-s-guidehow-to-bake-bread-a-beginners-guide
10% Off & Free Shipping!10-off-and-free-shipping10-off-and-free-shipping
C++ vs C# in 2026c-plus-plus-vs-c-sharp-in-2026c-plus-plus-vs-c-sharp-in-2026
red/greenred-greenred-green
Version 2.0version-2-0version-2-0
Café Crème Brûléecafe-creme-bruleecafe-creme-brulee
my_file_namemy-file-namemy-file-name
2026-09-28 Release Notes2026-09-28-release-notes2026-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 beginners and dont, normal mode gives beginner-s and don-t. Strict is usually better for English titles.
  • Slashes and dots between words: both modes treat them as separators, so "red/green" gives red-green and "Version 2.0" gives version-2-0 either 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 /About and /about as different URLs, which can create duplicates.
  • Cut filler words when the meaning survives. how-to-bake-bread-a-beginners-guide can become bake-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"

Frequently Asked Questions

What's the difference between strict and normal mode?
Normal mode replaces each special character with a hyphen, while strict mode deletes it. So "Beginner's" becomes beginner-s in normal mode and beginners in strict mode. Slashes and dots separate words in both modes, so "red/green" becomes red-green either way.
Should slugs be lowercase?
Yes, lowercase is recommended. Many web servers treat URLs as case-sensitive, so /Blog/Post and /blog/post can be two different pages. Using lowercase everywhere avoids duplicate URLs and broken links.
How long should a slug be?
Aim for about 3 to 6 meaningful words. That is long enough to describe the page and short enough to read in search results and share easily. This tool does not shorten slugs, so trim long titles yourself.
Can I use underscores instead of hyphens?
Hyphens are the better choice. Google recommends hyphens to separate words in URLs. This tool converts underscores to hyphens automatically, so my_file_name becomes my-file-name.
What happens to accented characters?
They are converted to plain letters, so "Café Crème Brûlée" becomes cafe-creme-brulee. Letters such as ß, æ, œ, ø and ł are spelled out as ss, ae, oe, o and l. Note that ü becomes u, not ue.
Why does it say "No Latin letters or numbers to convert"?
The input contains no Latin letters or digits. Text written only in scripts such as Cyrillic, Arabic or Chinese, or only in symbols and emoji, is removed completely, so no slug is left. Add a Latin transliteration of the title to get a slug.
How are symbols like &, + and # handled?
They are spelled out so the meaning survives. & becomes and, + becomes plus, and # right after a letter becomes sharp, so "Rock & Roll" becomes rock-and-roll, "C++" becomes c-plus-plus and "C#" becomes c-sharp. Other symbols are dropped.
Can I keep uppercase letters in the slug?
Yes. Uncheck Convert to lowercase and the tool keeps the original capitalization, so "iPhone 15 Pro Review" becomes iPhone-15-Pro-Review. Lowercase slugs are still the safer choice for public URLs.
Should I change the slug of a page that is already published?
Only if the old slug is misleading or badly broken. Changing it creates a new URL, so add a 301 redirect from the old address to keep existing links, bookmarks and search rankings working.