You publish a blog post and your CMS suggests the address example.com/2026/09/29/10-tips-for-a-better-q4-sales-plan-that-actually-works-in-practice. Or it gives you example.com/?p=4821. Neither is ideal. The part of the URL that names the page, the slug, is small, but it appears in search results, in shared links and in your analytics reports for as long as the page exists.
This guide explains what a slug is, what makes a good one, how to handle tricky characters such as accents, ampersands and non-Latin scripts, and why changing a slug after publishing needs care.
What a slug is
A URL has several parts:
https://www.example.com/blog/quarterly-sales-planning-guide?utm_source=newsletter
└─scheme─┘└────host─────┘└path┘└──────────slug───────────┘└──query string──┘
The slug is the final, human-readable segment of the path that identifies one specific page. The term comes from newspaper publishing, where a "slug" was a short working name for a story.
A good slug is:
- readable: a person can guess the page topic from it;
- short: usually a few words, not the whole headline;
- stable: it does not change after publication;
- safe: it uses only characters that work in every browser, email client and chat app without being encoded.
The rules of a clean slug
Lowercase
URLs can be case-sensitive on some servers, so /Pricing and /pricing could be different pages. Using lowercase consistently avoids duplicates and broken links.
Hyphens between words
Spaces are not allowed in URLs; a space becomes %20, which is ugly and easy to break. Separate words with hyphens. Google's URL structure guidance recommends hyphens rather than underscores to separate words, and hyphens are the widespread convention.
Letters and digits only
Punctuation such as ?, #, &, % and quotes has special meaning in URLs or must be encoded. A slug should drop it. Symbols that carry meaning can be spelled out instead: "Sales & Marketing" becomes sales-and-marketing.
Accents and special letters
café-crème may display correctly in a modern browser's address bar, but it is sent as percent-encoded bytes (caf%C3%A9-cr%C3%A8me) and often shows that way when copied into emails or documents. You can see the encoded form for yourself with the URL Encoder. Converting accented letters to their plain equivalents (cafe-creme) keeps links tidy. Some letters need special handling: German ß becomes ss, Danish ø becomes o.
For sites written in a non-Latin script, such as Hindi, Arabic or Russian, there is a real choice: transliterate into Latin letters, or keep native-script slugs, which are valid and readable for native speakers but long when encoded. Consistency across the site matters more than the choice itself.
Stop words
Stop words are short, common words like "a", "the", "of" and "in". Removing them shortens slugs: "The Complete Guide to Office Relocation" becomes complete-guide-office-relocation. Remove them when the slug still reads naturally; keep them when removing them changes the meaning ("to-do", "not", "how-to").
Generate slugs in your browser
Our Slug Generator converts titles into clean slugs as you type.
- Open the Slug Generator.
- Type or paste a title into Title or text.
- Choose a Separator: Hyphen ( - ) recommended, Underscore ( _ ) or Dot ( . ).
- Set Max length (0 = no limit) if your CMS or style guide limits slug length. The tool cuts at a separator so it never leaves half a word when it can avoid it.
- Toggle Lowercase, Remove stop words and Keep non-Latin letters as needed. The stop-word option removes common English function words such as "a", "the", "of", "in" and "for", but keeps words that carry meaning: "how", "what", "why", "when", "where", "who", "not", "no" and "nor", plus the "to" in "how to". "How to Fix a Leaking Tap" becomes
how-to-fix-leaking-tapand "Why You Should Not Skip Breakfast" becomeswhy-not-skip-breakfast. Other short words, such as "do" in "to-do", are still removed, so read the result and switch the option off if meaning is lost. - Check the Preview line, which shows the slug in a sample URL, then click Copy.
For many titles at once, such as a content calendar or a product import, switch on Bulk mode, paste one title per line and download all the slugs as a .txt file.
The generator removes accents, converts special letters (ß to ss, æ to ae and so on), spells out &, @ and % as words, removes apostrophes so "What's New" becomes whats-new rather than what-s-new, and collapses everything else into single separators.
Other ways to create slugs
- Your CMS. WordPress and most other content management systems generate a slug from the title automatically and let you edit it before publishing. Always review it: automatic slugs are often too long or include dates.
- Spreadsheets. For bulk work, a formula such as
=LOWER(SUBSTITUTE(TRIM(A2)," ","-"))handles simple cases, but it does not remove punctuation or accents. - Code. Most web frameworks include or have libraries for a "slugify" function. That is the right choice when slugs are generated inside an application.
The generator is most useful for planning URLs before content exists, for bulk lists, and for titles with accents, symbols or non-English characters that simple formulas mishandle.
When not to change a slug
Once a page is published, its URL may be bookmarked, linked from other sites, shared on social media and indexed by search engines. Changing the slug breaks all of those links unless you set up a redirect.
If you must change it, add a 301 (permanent) redirect from the old URL to the new one. Our .htaccess redirect generator produces the rules for Apache servers, and our guide on setting up 301 redirects explains the process.
Practical tips
- Leave dates out unless they are essential, such as for an annual event or a news archive. A dated slug makes evergreen content look old.
- Avoid numbers that will change.
7-ways-to-cut-costsbecomes wrong if you add an eighth. - Match the page's main topic. The slug does not need every word from the title, just the core idea.
- Check title and description too. A clean slug works alongside a good title tag; the Character Counter helps keep titles and descriptions within typical display lengths.
- Use the same separator everywhere. Mixing hyphens and underscores looks careless and is harder to type.
Frequently asked questions
What is a slug in a URL?
It is the last readable part of a page's address that identifies the page, such as office-moving-checklist in example.com/guides/office-moving-checklist.
Should I use hyphens or underscores in URLs?
Use hyphens. They are the common convention, and Google's guidance recommends hyphens to separate words in URLs.
How long should a URL slug be?
There is no fixed rule. Aim for the shortest version that still describes the page, often three to six words.
Should I remove stop words from slugs?
Usually yes, if the slug still reads naturally. Keep words like "how", "to" or "not" when they are essential to the meaning. Our Slug Generator already keeps question words, negations and the "to" in "how to" when it removes stop words.
Can I change a slug after publishing?
You can, but set up a 301 redirect from the old address to the new one, otherwise existing links and bookmarks will lead to an error page.