Slug Generator

Generate URL slugs, with optional Chinese-to-pinyin conversion

Runs in your browserUtility05Text & Diff

What is Slug Generator?

A slug generator turns a title into a clean hyphenated URL segment: punctuation is stripped, everything is lowercased, and runs of separators collapse into one. Chinese titles can either be transliterated to pinyin or left as Han characters, whichever suits your URL scheme. Conversion happens locally in your browser.

How to use Slug Generator

  1. 1Enter an article or page title.
  2. 2Choose a separator, and enable pinyin transliteration if the title is in Chinese.
  3. 3Copy the slug, and check that it is not too long — five words or fewer is a good target.

Frequently asked questions

Should a URL use Chinese characters or pinyin?+

Both work. Han characters read more naturally in search results, but they get percent-encoded into a long unreadable string the moment someone copies the link. Pinyin slugs are shorter, safe everywhere, and much easier to read out in a team chat. For a Chinese-language site with long titles, pinyin is the safer default.

Does a slug need to contain keywords?+

Including the core keyword helps, but there is no need to cram the whole title in. Long slugs get truncated in search results and are awkward to share. Three to five meaningful words is plenty — and once a URL is published, leave it alone rather than rewriting it later.

Related tools

All tools