Slug Generator

Turn any text into a URL-friendly slug online. Supports mixed Chinese and English input, a choice of hyphen or underscore separator, and lowercase or uppercase output, updated as you type.

FreeOnline Tool
Loading…

How to Use

  1. Type the text you want to convert into the input box (mixed Chinese and English is supported).
  2. Choose the separator (hyphen - by default, or underscore _).
  3. Choose the letter case (all lowercase or all uppercase).
  4. The result appears in the output box in real time.
  5. Click "Copy" to take the generated slug.

Features

  • Replaces spaces and special characters with the separator you selected.
  • Strips characters that are unsafe in a URL, such as # ? & and =.
  • Optional Chinese-to-pinyin conversion so the slug is pure ASCII.
  • Custom separator: hyphen or underscore.
  • Live preview, with no button to press.

Use Cases

Creating blog post URLs
Turn an article headline into an SEO-friendly URL slug, for example "10 Tips to Boost Productivity" becoming 10-tips-to-boost-productivity.
Managing CMS content
Generate consistent permalink slugs for every entry in WordPress, Strapi or a similar CMS to keep the URL structure tidy.
Naming product SKUs and pages
Convert product names into slug form for product URL paths, improving readability and SEO on an ecommerce site.
Naming API routes
Convert resource names into standard lowercase hyphenated form when designing RESTful APIs, matching common naming conventions.

FAQ

What is a slug?
A slug is the readable string in a URL path that identifies a page, like my-first-post in /blog/my-first-post. Slugs make URLs easier to read and help with SEO.
How do I create a slug from a Chinese title?
Chinese characters cannot be used directly in a standard slug. Depending on the mode you choose, the tool either converts the Chinese to pinyin first or strips the Chinese characters out.
Should a slug use hyphens or underscores?
Google officially recommends hyphens (-) over underscores (_), because search engines treat the hyphen as a word separator, which is better for SEO.
Is there a maximum slug length?
Aim for 50 to 60 characters, which is both memorable and SEO-friendly. Browsers and servers generally support URLs up to 2048 characters.