๐ Slug Generator
hello-world-this-is-a-blog-post-title
Automatically generate a URL-friendly slug โ using only letters, numbers, and hyphens or underscores โ from a blog post title or any piece of text. Choose your separator character and whether to lowercase the result.
How to use
- Enter the title or text you want to turn into a slug.
- Choose a separator character (hyphen or underscore).
- Toggle lowercase conversion on or off as needed.
- Copy the generated slug with the "Copy" button.
How the calculation works
A slug is the short string that identifies a page within a URL. This tool transforms text in the following order: 1. Unicode normalisation (NFKD) decomposes characters: "รฉ" splits into "e" plus an accent mark, and full-width "๏ผก๏ผข๏ผฃ" and "๏ผ๏ผ๏ผ๏ผ" become ordinary "ABC" and "2026". 2. The separated accent marks are removed (cafรฉ โ cafe). 3. The text is lowercased if selected. 4. Each run of characters other than ASCII letters and digits is replaced with one separator (hyphen or underscore). 5. Repeated separators are collapsed, and separators at the start and end are removed. In URLs, characters other than ASCII letters and digits (Japanese text, spaces) are percent-encoded into long, unreadable strings, which is why slugs are conventionally limited to letters, digits and a separator. Search engine guidelines also recommend hyphens rather than underscores between words.
Worked example
"Cafรฉ au Lait: 10 Tips!" Result: cafe-au-lait-10-tips The accent is stripped from รฉ, the colon, spaces and exclamation mark collapse into hyphens, and the trailing separator is removed. Full-width "๏ผก๏ผข๏ผฃใ๏ผ๏ผ๏ผ๏ผ" becomes abc-2026. Text containing Japanese, such as "ๆฅๆฌ่ชใฟใคใใซ 2026", loses the Japanese part entirely, leaving just 2026.
Things to be aware of
- Japanese characters are removed. Convert Japanese titles to romaji or English first.
- Changing the slug of a published page breaks links to the old URL; set up a redirect if you change it.
- Slugs are usually kept short, using words that describe the content.
- Some servers treat URLs with capital letters as different pages, so lowercasing is recommended unless you have a reason not to.
FAQ
Can this slugify non-Latin text like Japanese?
Non-Latin characters are automatically replaced with the separator. For a readable slug that includes the original meaning, manually romanize the text first.
Can I use this directly in WordPress or Next.js URLs?
Yes โ the generated slug only contains letters, numbers, and your chosen separator, so it's safe to use directly as a URL path.
How are accented characters (รฉ, รฑ, etc.) handled?
Accents are automatically stripped and the base Latin letter is kept (e.g. cafรฉ โ cafe).