How to create a URL slug
- Paste or type a title in the box. For several slugs at once, put one title per line.
- The slug appears instantly: lowercase, with hyphens between words and no accents or symbols.
- Optionally remove common words like “a”, “the” and “of”, switch to underscores, or set a maximum length.
- Click Copy result and paste the slug into WordPress, Shopify or your CMS.
What is a URL slug?
The slug is the readable part at the end of a web address that names the page. In example.com/blog/how-to-bake-bread, the slug is how-to-bake-bread.
A good slug tells people and search engines what the page is about before they click, so it's worth getting right before you publish.
Slug best practices for SEO
- Keep it short: 3–5 words is usually enough. Long slugs get cut off in search results.
- Use your main keyword: a page about baking bread should have “bread” in its slug.
- Use hyphens, not underscores: Google recommends hyphens to separate words in URLs.
- Use lowercase only: some servers treat
/Pageand/pageas different addresses. - Drop filler words when it helps:
bake-bread-homeis shorter thanhow-to-bake-bread-at-home. - Leave out dates if you plan to update the article later.
- Don't change a slug after publishing unless you add a 301 redirect from the old address, or visitors and Google will get a 404 error.
Examples
| Title | Slug |
|---|---|
| How to Bake Bread at Home | how-to-bake-bread-at-home |
| How to Bake Bread at Home (common words removed) | bake-bread-home |
| Café & Crème: 10 Tips! | cafe-and-creme-10-tips |
| Don't Panic: A Beginner's Guide | dont-panic-a-beginners-guide |
| What Is camelCase? | what-is-camelcase |
Related tools and guides
A slug is the same as kebab-case, the style used for URLs and CSS classes. Learn how it compares with other naming styles in What is camelCase?, and check your page title's length with the character counter.
Frequently asked questions
What is a slug in a URL?
The slug is the last, human-readable part of a web address, such as best-running-shoes in example.com/blog/best-running-shoes. It identifies the page in a way people and search engines can read.
Should I use hyphens or underscores in URLs?
Hyphens. Google recommends hyphens to separate words in URLs, and they're the standard on most websites. Underscores are mainly used in file names and code.
How long should a URL slug be?
Short and descriptive: usually 3–5 words or under about 60 characters. Use Max length to cut long slugs at a whole word.
Can I change a slug after publishing?
Yes, but add a 301 redirect from the old address to the new one. Otherwise links to the old address show a 404 error and the page can lose its ranking.
What happens to accents and special characters?
Accents are removed (é → e, ñ → n), “&” becomes “and”, apostrophes are dropped (don't → dont), and emoji and other symbols are removed, so the slug works in every browser.