How the slug generator works
Type or paste a title and the slug updates as you type. The conversion runs in this order:
- Transliterate accents. Characters such as é, ñ, ü and ç are decomposed with Unicode normalisation and the accent marks are stripped, so “Café” becomes “cafe” and “São Paulo” becomes “sao-paulo”. Ligatures and special letters (ß, æ, ø, ł) are mapped to plain ASCII too.
- Replace
&with “and”, so “Tea & Coffee” reads naturally astea-and-coffee. - Lowercase everything (optional but recommended — most servers treat
/Aboutand/aboutas different pages). - Replace every run of non-alphanumeric characters (spaces, punctuation, symbols, emoji) with a single separator.
- Collapse repeated separators and trim any from the ends, so “Hello – World!” gives
hello-world, neverhello---world-. - Apply the max length, cutting at the last separator before the limit so no word is chopped in half.
Example
| Title | Slug |
|---|---|
| 10 Best Café Recipes for Monsoon Evenings | 10-best-cafe-recipes-for-monsoon-evenings |
| Q&A: What’s New in Python 3.13? | q-and-a-whats-new-in-python-3-13 |
| Übersicht der Preise 2026 | ubersicht-der-preise-2026 |
Choosing a good slug
A slug is part of the URL that both people and search engines read, so treat it like a very short headline.
- Keep it short. Three to six meaningful words is plenty. Drop filler such as “a”, “the” and “of” if the slug still makes sense:
emi-calculator-home-loanbeatsthe-best-emi-calculator-for-a-home-loan. - Put the main keyword first. Search snippets truncate long URLs, and the first few words carry the most weight.
- Avoid dates and numbers you may change. A post at
/best-phones-2024/looks stale the following year;/best-phones/can be updated forever. - Never change a published slug without a 301 redirect, or you lose backlinks and rankings.
- Use ASCII only. Browsers can display Hindi or Tamil URLs, but they are percent-encoded when copied (
%E0%A4%AD…), which is ugly in messages and breaks on some platforms. Transliterate or translate the title instead.
Where slugs are used
- Blog permalinks in WordPress, Ghost, Hugo and Astro
- Product and category URLs in Shopify, WooCommerce and Magento
- Usernames and handles that must be URL-safe
- File names for images and PDFs —
diwali-offer-2026.jpgis better for image search thanIMG_4521.jpg - Anchor IDs for headings inside a page
Tips
- Set a max length of around 60–75 characters for URLs; longer slugs are allowed but get truncated in search results.
- Choose the underscore separator only when a system requires it (some CMS field names, Python module names). For web pages, stay with hyphens.
- The preview under the slug shows it wrapped in slashes so you can picture the final URL.
Frequently asked questions
What is a URL slug?
A slug is the readable part of a URL that identifies a page, such as "emi-calculator" in freeonlinetoolswebsite.com/emi-calculator/. Good slugs are short, lowercase and use hyphens.
Should I use hyphens or underscores?
Use hyphens. Google treats hyphens as word separators but treats underscores as joining characters.