What makes a good URL slug
A slug is the human-readable last segment of a URL — the bit after the final slash. For toolbook.io/blog/how-to-write-good-slugs, the slug is how-to-write-good-slugs. It is the first thing a search engine reads about a page, the most-shared visible part of the URL, and the part that travels with every link, tweet, and Slack message.
Three rules cover most cases. Keep it short. Keep it readable. Match the language people actually search.
Hyphens, not underscores
Google explicitly treats hyphens as word separators and underscores as part of the word. my-post parses as two words ("my" and "post"); my_post parses as one ("my_post"). For URLs you almost always want the search engine to see word boundaries, so hyphens win.
Underscores survive in code identifiers because programmers use them as separators where hyphens are illegal (you cannot name a variable my-post in Python). On the web, hyphens are the only right answer.
Length: aim for under 60 characters
Search results on desktop Google show roughly 70 characters of URL before truncating with an ellipsis. Mobile shows even less. The 60-character cap on this tool defaults to that ceiling because anything longer gets cut visibly in search results — losing exactly the keywords you fought to include.
A clean target is three to six words. Headlines often run twelve to fifteen words; trim aggressively. "How to write good URL slugs in 2026 — a complete guide" is a great article title; the slug should be write-good-url-slugs-2026 or even just good-url-slugs.
Drop the joining words
Articles ("a", "an", "the"), prepositions ("of", "on", "to", "in", "with"), and connectors ("and", "or", "but") add length without adding search value. Search engines weight these words as nearly zero anyway, so removing them is free. The "Drop stop words" toggle on this tool does this automatically — turn it on and watch the length crash.
That said, do not strip a stop word that changes meaning. the-great-gatsby is the title of the book; great-gatsby is something else. Use judgment.
Match how people actually search
Slugs are SEO real estate. Pick keywords that match the user query, not the marketing line. If your post is titled "We Reimagined the Way You Manage Tasks," nobody types that into Google — the matching slug is task-management-app or simple-task-manager, not we-reimagined-task-management.
Run the slug through your own search engine. Does it answer "what someone would type to find this page"? If not, rewrite.
Accents and Unicode
Every slug should be ASCII. URLs technically support Unicode through percent-encoding, but naïve becomes na%C3%AFve when shared, which looks ugly in tweets and breaks line wrapping in chat clients. Transliterate to plain ASCII at slug-generation time and skip the problem entirely.
Common transliterations: é → e, ö → o, ñ → n, ü → u, ç → c. The "Transliterate accents" toggle on this tool runs Unicode normalization (NFD) and strips combining marks — the standard, well-tested algorithm.
Never change a published slug
Once a slug is live, every link to it is now a live address. Change the slug and every link 404s. If you absolutely must change it (you typo'd, you legally have to, the old one is cursed), set up a 301 redirect from the old slug to the new one before pushing the change. Search engines transfer the ranking history through 301s; bare changes lose it.
The simplest rule: spend two extra minutes picking the right slug at publish time, and you will never need to change it.