URL Slug 生成器
把任意标题转成简洁、对搜索引擎友好的 URL slug,自动去除重音符号和特殊字符,支持自定义分隔符。
What makes a good slug
A slug is the last part of a URL: example.com/how-to-make-sourdough-bread. Search engines use it as a ranking signal, and humans read it in search results.
The rules that hold up:
- Lowercase only — URLs are case-sensitive, and uppercase looks sloppy
- Hyphens, not underscores — Google treats a hyphen as a word separator, an underscore as a joiner
- No accents —
creme-bruleenotcr%C3%A8me-br%C3%BBl%C3%A9e - Short — aim for 3–5 meaningful words
- Match the title — the slug should summarise the page, not contradict it
How accents are handled
The tool normalises Unicode text (NFD form) and strips the combining diacritics, so Café Crème becomes cafe-creme rather than cafe-creme with percent-encoded bytes. Non-Latin scripts (Chinese, Cyrillic, Arabic) are removed entirely by the default filter — if you need those preserved, add a language-specific slug library on your backend instead.
Length guidance
| Context | Recommended length |
|---|---|
| Blog post slug | 3–6 words |
| Product URL | 2–4 words |
| Landing page | 1–3 words |
Aim for under 60 characters total including the domain, so it never gets truncated in search results.
常见问题
What makes a good URL slug?
Lowercase, hyphens rather than underscores, no accents, short, and a close match to the page title. Aim for three to five meaningful words.
Are accents removed?
Yes. Café Crème becomes cafe-creme rather than a percent-encoded mess.
What happens to non-Latin characters?
They are removed by the default filter, since a slug has to stay in the URL-safe ASCII range. If you need them preserved, use a language-specific slug library on your backend.
How long should a slug be?
Under 60 characters including the domain, so it never gets truncated in search results.
Should I use hyphens or underscores?
Hyphens. Google treats a hyphen as a word separator and an underscore as a joiner, so my-post ranks better than my_post.