URL Slug Generator for SEO: How to Write Slugs Google Understands
Updated 2026-10-13 · 8 min read
The slug is the last part of a URL, the only piece a human will read, and the only piece that is entirely under your control. It is also the piece people change on a whim two years later and then wonder why their traffic dropped. This guide covers the rules that survive contact with reality, what slugs actually influence, and how to get them right the first time.
What a slug is
In https://example.com/blog/how-to-write-a-slug/ the slug is how-to-write-a-slug. It is the human readable identifier for the page, and it should describe the page rather than the date, the author or an internal job number.
Because paths build on each other, slugs sit inside a hierarchy: /blog/ for articles, /tools/ for utilities, /category/ for archives. Decide that structure early, because moving pages between folders later is expensive.
The rules that hold up
None of these are stylistic preferences. Each one has a mechanical reason behind it.
- Lowercase everything, because URL paths are case sensitive on many servers and uppercase invites duplicate content problems
- Separate words with hyphens rather than underscores. Search engines read a hyphen as a word separator and an underscore as a joiner
- Drop articles and filler where the meaning survives, so this-is-the-best-way becomes best-way
- Remove punctuation rather than encoding it, and transliterate accents so cafe stays cafe instead of a percent encoded string
- Aim for three to five words. There is no penalty for length, but long slugs get truncated and look unreliable when shared
- Leave dates out of evergreen content. A year in the URL means either updating the address every January or publishing a page that visibly ages
Do keywords in the URL still matter?
Search engines have been consistent on this for years: words in a URL are a very weak signal, and most of the benefit people measure is correlation rather than causation. Pages about slugs rank for slug related terms partly because their address contains the term, which is circular.
Three genuine benefits remain, and they are reasons enough to bother. The URL appears in search results, so it influences whether people click. It appears when the page is shared, so it influences whether people trust the link. And a descriptive slug makes your own site easier to navigate a year later.
Where people go wrong is stuffing. A slug like best-cheap-free-online-word-counter-tool reads worse than word-counter and offers nothing extra, because it looks like spam to the humans who matter.
The redirect trap
Changing a slug after publication breaks the old address. You must add a permanent redirect from the old URL to the new one, and even then you lose some of what the page had earned along with the links and shares pointing at the old address.
Some of that returns over time, but the safest policy is to treat the slug as permanent from the moment you publish. Which means the right moment to get it right is before you hit publish, not after.
Generating slugs in one step
The mechanical part, lowercasing, stripping punctuation, replacing spaces with hyphens and transliterating accents, is exactly what a generator is for. The judgement part, choosing which words survive, is still yours.
- URL slug generator - handles case, punctuation and accents
- Case converter for cleaning up headings first
Patterns that work by content type
A handful of shapes cover almost every page you are likely to build.
- Article - /blog/topic-of-the-post/
- Tool or utility - /tool-name/ at the root, with no folder, since these are the pages you most want short
- Category archive - /category/name/
- Comparison or review - /product-a-vs-product-b/
- Localised content - the language code as the first segment, /es/ or /de/, not as a suffix
Start with one of these
Every tool below runs in your browser. No download, no account.
URL Slug Generator
Turn any title into a clean, SEO-friendly URL slug.
Case Converter
Uppercase, lowercase, title case, sentence case and camelCase.
Word Counter
Live word count, plus sentences, paragraphs and reading time.
Character Counter
Character count with and without spaces, plus platform limits.
Remove Duplicate Lines
Clean duplicate lines out of any list, with optional sorting.
Lorem Ipsum Generator
Placeholder text by paragraph, sentence or word count.
Frequently asked questions
Should URL slugs use hyphens or underscores?
Do I need to change my slug to rank better?
How long should a URL slug be?
Are numbers or dates in a slug harmful?
More guides
- How to Remove Duplicate Lines From a List Without Corrupting Your Data
- Character Count vs Word Count: What Each One Actually Measures
- How to Convert Text to Title Case Online (And When Not To)
- Lorem Ipsum Generator: Where the Text Comes From and How Much You Need
- Text Formatter Online: Five Cleanup Jobs Almost Everyone Needs
- How to Reduce Word Count Without Gutting Your Argument
- How to Count Characters in Google Docs (and Every Other Editor)
- The X Character Limit: What Counts Toward the 280 and What Does Not
- How Many Words Is a 5 Minute Speech? Speaking Rates That Actually Work
- What Counts as a Word? Hyphens, Numbers and Acronyms Explained
- How to Write a Meta Description That Earns the Click
- Capitalization Rules in English: The Ones That Cover Almost Everything
- How to Remove Line Breaks From Copied Text (Without Losing Paragraphs)
- The Best Free Online Writing Tools, and What Each One Is Actually For