Slug Generator
Turn titles into clean URL-friendly slugs
Slug Generator — what it does
Turn a title into a clean URL slug, replacing spaces with a separator you choose, lowercasing the result and stripping the punctuation that does not belong in a web address. There is an option to keep non-Latin letters, which matters if your site uses them deliberately.
Worked example
A report title turned into a slug with the default settings: hyphen separator, Lowercase on, Keep Unicode letters on. The output updates as you type; there is no Run button.
Input — title
Q4 Budget Review – Café Sales & Forecast (Draft #2)
Output — slug
q4-budget-review-cafe-sales-forecast-draft-2
The en dash, ampersand, parentheses and # all collapse into single hyphens, and the accent on Café is stripped.
When this tool helps
- Creating readable URLs for blog posts, articles and documentation pages.
- Generating consistent identifiers for files, records or CSS classes from human titles.
- Cleaning up an imported title before it becomes part of a permanent link.
How to use it
- Paste the title text.
- Choose the separator, usually a hyphen.
- Set lowercase output and whether to keep non-Latin letters.
- Copy the generated slug.
Accuracy, limits, and good practice
- Hyphens are the convention in URLs; underscores are harder to see under a link's underline and are treated differently by some tools.
- Short slugs age better. Drop filler words and keep the two or three that actually identify the page.
- Once a URL is published, changing the slug breaks every existing link to it — set up a redirect if you must change one.
- Decide the slug when the page is created, not after it has been shared: every link, bookmark and citation points at the address you published first.
Frequently asked questions
Should slugs be lowercase?
Yes. URL paths are case-sensitive on most servers, and mixed case invites duplicate URLs pointing at the same content.
Can I use non-Latin characters?
Modern browsers handle them, and the option keeps them. They can still be mangled when copied through older systems.
Do slugs affect search ranking?
Only marginally as a ranking factor, but a readable slug improves click-through and makes links comprehensible when shared as plain text.
Should the slug match the page title exactly?
It should reflect it, but a shortened version usually reads better. Titles change over time while URLs should not.
Are accented letters kept when the Unicode option is on?
No. Accents are always removed first (é becomes e, ü becomes u), whichever way the Unicode option is set. The option only decides whether letters outside A–Z, such as Chinese or Cyrillic, survive: with it on, "東京 Office – 2026 計畫" gives 東京-office-2026-計畫; with it off, the same title gives office-2026.
What happens to & and + in a title?
They are not spelled out as "and" or "plus": each run of characters that is neither a letter nor a digit becomes one separator, so "R&D + Ops" gives r-d-ops. Leading and trailing separators are removed, and with the underscore separator the same title gives r_d_ops.
Related tools on this site
- XML to JSON — Convert XML elements and attributes into JSON
- Find & Replace — Replace repeated words or phrases at once
- Line Number Tool — Add or remove line numbers from text
Further reading: Cleaning Up Text You Pasted From Somewhere Else
Everything above runs inside this page. Slug Generator needs no account, no upload, and no server round trip — close the tab and nothing is left behind.
網址別名產生器能做什麼
把標題轉成乾淨的網址 slug:以你選的分隔符取代空格、轉成小寫,並去掉不該出現在網址中的標點。另有保留非拉丁字母的選項,若你的網站刻意使用它們就用得上。
實際範例
一個報告標題以預設設定轉成網址別名:分隔符為連字號、轉小寫開啟、保留 Unicode 字母開啟。文字會邊打邊更新,沒有執行按鈕。
來源:標題
Q4 Budget Review – Café Sales & Forecast (Draft #2)
轉換後:網址別名
q4-budget-review-cafe-sales-forecast-draft-2
連接號、& 符號、括號與 # 全部縮成單一連字號,Café 的重音也被去掉。
什麼時候用得上
- 為部落格文章、報導與說明頁建立好讀的網址。
- 從人類可讀的標題產生檔案、紀錄或 CSS 類別的一致識別字。
- 在匯入的標題成為永久連結的一部分之前先整理乾淨。
使用步驟
- 貼上標題文字。
- 選擇分隔符,通常用連字號。
- 設定是否轉小寫、是否保留非拉丁字母。
- 複製產生的 slug。
精確度、限制與實務建議
- 網址慣例用連字號;底線在連結底線下不易辨識,某些工具的處理方式也不同。
- 短 slug 更耐用。去掉填充詞,留下真正能識別該頁的兩三個字。
- 網址一旦公開,改 slug 就會讓所有既有連結失效——非改不可時請設好轉址。
- 請在頁面建立時就決定 slug,而不是分享之後:每個連結、書籤與引用指向的都是你最初發布的那個網址。
常見問題
slug 一定要小寫嗎?
是。多數伺服器的網址路徑區分大小寫,大小寫混用容易產生指向同一內容的重複網址。
可以用非拉丁字元嗎?
現代瀏覽器支援,選項也能保留它們;但經過較舊的系統複製時仍可能亂碼。
slug 會影響搜尋排名嗎?
作為排名因素影響很小,但好讀的 slug 能提升點擊率,也讓連結以純文字分享時看得懂。
slug 要和標題完全一致嗎?
反映標題即可,通常縮短版更好讀。標題會隨時間修改,網址則不該改。
保留 Unicode 開啟時,重音字母會保留嗎?
不會。不論 Unicode 選項如何設定,重音一律先被去掉(é 變 e、ü 變 u)。這個選項只決定 A–Z 以外的字母(例如中文或西里爾字母)是否保留:開啟時「東京 Office – 2026 計畫」會得到 東京-office-2026-計畫;關閉時同一標題只剩 office-2026。
標題裡的 & 和 + 會怎樣?
不會被寫成 and 或 plus:每一段連續的非字母非數字字元都會變成一個分隔符,所以「R&D + Ops」會得到 r-d-ops。開頭與結尾的分隔符會被去掉;改選底線分隔符時,同一標題會得到 r_d_ops。
本站相關工具
- XML 轉 JSON — 將 XML 元素與屬性轉換成 JSON
- 尋找與取代 — 一次批量替換重複的文字或片語
- 行號工具 — 為文字加入或移除行號
延伸閱讀: 清理從別處貼上的文字
以上步驟全部在這個頁面內完成,網址別名產生器 不需要註冊、不上傳檔案、也不經過伺服器,關閉分頁後不會留下任何資料。