Slug Generator

Turn any headline into a clean URL slug — lowercased, accents stripped, with your choice of hyphen or underscore separators.

Slug Generator

Turn any headline into a clean URL slug — lowercased, accents stripped, with your choice of hyphen or underscore separators.

Paste a page title or headline and get a URL-safe slug instantly: the generator lowercases everything, strips diacritics (café → cafe), collapses punctuation and spaces into your chosen separator, and trims the ends. One click copies the result for your CMS, router, or file name.

Generated Slug24 chars
10-tips-for-better-sleep

• Lowercased, accents stripped (café → cafe), spaces & punctuation → separator.

• Safe for URLs, file names, and CSS class names.

How to use this calculator

  1. Paste your headline, page title, or any text into the input.
  2. Choose hyphen (-) or underscore (_) as the word separator.
  3. Review the generated slug and its character count.
  4. Click Copy and paste it into your CMS, router, or file name.

Worked example

"Café au Lait: 10 Recipes!" becomes "cafe-au-lait-10-recipes" — lowercased, the é stripped to e, and punctuation collapsed into hyphens.

Frequently Asked Questions

What is a URL slug?

The human-readable tail of a URL, like "clean-url-slugs" in example.com/blog/clean-url-slugs. Slugs are derived from the page title, stripped of anything unsafe or ugly in a URL. Good slugs are short, descriptive, and keyword-rich, which helps both users and search engines understand the page.

Should I use hyphens or underscores?

Hyphens. Google explicitly treats hyphens as word separators but historically has not done the same for underscores, so "my-page" ranks better than "my_page" for the words "my" and "page". Underscores remain common in Python identifiers and some legacy systems, which is why the option exists here.

How are accented characters handled?

Through Unicode NFD normalization: é decomposes into e plus a combining accent mark, and the mark is stripped, so "Café" becomes "cafe". This keeps slugs ASCII-safe and readable. Characters from non-Latin scripts without a Latin decomposition are removed rather than transliterated.

Why keep slugs short?

Short slugs are easier to read, share, and remember, and they keep the keyword focus tight. Many CMSs auto-generate slugs from the full title, which can get unwieldy — paste the title here, then trim the result to the essential 3–5 words before publishing.