What Is a URL Slug and How Do You Write a Good One?
Updated November 2026
Written by the Toolpuffin team. Tools in this guide are tested in the browser.
The slug is the readable last part of a web address. A clean one is easy to read, easy to share and tells people what the page is about. This guide shows how to write one and how to make it in a click.
What a slug is
In example.com/blog/how-to-compress-an-image the slug is how-to-compress-an-image. It comes from the page title, written in a form that is safe to use in an address.
Rules for a good slug
- Use hyphens between words, not underscores or spaces. Google recommends hyphens because they help people and search systems tell the words apart.
- Use lower case letters, numbers and hyphens only.
- Keep it short and descriptive, about three to six words.
- Leave out small words such as the and a when the meaning stays clear.
- Do not put dates or ID numbers in it unless you need them.
An example
| Title | Slug |
|---|---|
| How to Compress an Image (Fast!) | how-to-compress-an-image-fast |
| Café Menu: Crème Brûlée | cafe-menu-creme-brulee |
Accents are removed (é becomes e) and punctuation disappears. Characters that cannot be converted, such as emoji or Chinese characters, are removed too.
Make a slug
- Paste your title, or one title per line.
- Choose the separator and options, such as a maximum length.
- Copy the slug.
Changing a slug later
Change a live address only when you have to. If you do, redirect the old address to the new one so visitors and links do not end up on an error page.