Skip to content
OneKitly

What Is a URL Slug? Why Lowercase, Hyphenated, and Good for SEO

Published 7/2/2025 · 3 min read · Developer tools

Daniel Okonkwo

Daniel OkonkwoFront-end developer and tech writer at OneKitly

Web performance · File formats

Checked against 2 sources

View profile
In short

A URL slug is the human-readable segment at the end of a web address that identifies a specific page, such as what-is-a-url-slug in example.com/blog/what-is-a-url-slug. Slugs are written in lowercase with words separated by hyphens because URLs are case-sensitive on many servers and hyphens are treated by search engines as word separators. A clean, descriptive slug is easier to read, share, and rank in search results than a numeric ID or a query string.

A URL slug is the readable, hyphenated part of a web address that names a page. Learn why slugs are lowercase, how they help SEO, and how to generate one from a title.

Where the slug lives in a URL

A URL has several parts: the scheme (https), the domain (example.com), the path, and optionally a query string and fragment. The slug is the final, meaningful piece of the path that names the individual resource. In example.com/blog/what-is-a-url-slug, the word blog is a path segment and what-is-a-url-slug is the slug identifying the article.

The word slug comes from newspaper publishing, where it was the short nickname given to a story while it moved through production. On the web it plays the same role: a short, stable handle for a page that stays readable even when the title later changes.

Why lowercase and hyphens

The path portion of a URL is case-sensitive on many web servers, so /About and /about can point to different pages or one of them can 404. Forcing slugs to lowercase removes that ambiguity and prevents duplicate-content problems where the same page is reachable at two casings.

Search engines recommend hyphens over underscores to separate words, because they read a hyphen as a space and an underscore as a joiner. So quick-brown-fox is indexed as three words, while quick_brown_fox may be read as one. Spaces themselves are not allowed raw in a URL; they would be percent-encoded as %20, which is ugly and hard to share, so hyphens are the clean substitute.

Generating a slug from a title

The usual recipe is: lowercase the title, replace spaces with hyphens, remove punctuation, and collapse any run of hyphens into one. So the title "What Is a URL Slug?" becomes what-is-a-url-slug. Many systems also strip small filler words and transliterate accented letters, turning café into cafe, so the slug stays within the plain ASCII characters that every browser handles identically.

Once a slug is published, treat it as permanent. If you must change it, set up a redirect from the old slug to the new one so existing links and search rankings are not lost. This is also why slugs should avoid dates or numbers that might change: a stable slug is a durable address.

Slug to title converterTurn a URL slug (my-blog-post) back into a readable title.Try the tool

Frequently asked questions

Is the slug the same as the whole URL?
No. The slug is just the readable segment that names the page, usually at the end of the path. The full URL also includes the scheme, domain, and any earlier path segments.
Can a slug contain non-English or accented characters?
Technically yes, via percent-encoding, but plain ASCII is safest for sharing and compatibility. Most systems transliterate accents, so é becomes e, keeping the slug clean.
How long should a slug be?
Short and descriptive is best: enough words to convey the topic, but not the entire title. Three to five meaningful words is a common target, dropping filler words like the and of.
Does changing a slug hurt SEO?
It can, because the old URL and its accumulated ranking stop working. If you must change it, add a permanent redirect from the old slug to the new one so links and rankings carry over.

Articles you may find interesting

All guides
ExplainerHow Fast Do You Read? Average Reading Speed and How to Measure ItMost adults read prose at about 200-250 words per minute. Learn what a normal reading speed is, how to measure yours in a minute, and why comprehension matters more than raw speed.ExplainerThe Caesar Cipher Explained: How Shift Ciphers and ROT13 WorkThe Caesar cipher shifts every letter by a fixed amount. Learn how the shift works, why ROT13 is a special case, how to encode and decode by hand, and why the cipher offers no real security today.ExplainercamelCase vs snake_case: A Guide to Naming Conventions in CodecamelCase, snake_case, PascalCase, and kebab-case explained: what each looks like, where it is the convention, and how to choose one consistently.How-toHow Long Will It Take to Download a File? Time, Bits vs Bytes, and OverheadEstimate download time from file size and connection speed. Learn the size ÷ speed formula, the crucial bits-versus-bytes conversion (divide by 8), and why real downloads run slower than the math predicts.How-toHow to Convert JSON to CSV: Flattening Arrays of Objects into Rows and ColumnsA practical guide to turning a JSON array of objects into a clean CSV file, including how to flatten nested fields and handle the tricky edge cases.ComparisoncamelCase, snake_case, kebab-case: Which One, and Why You Rarely Get to ChooseThe conventions are not taste. A hyphen is the minus operator, so kebab-case cannot be an identifier in most languages - which is exactly why CSS and URLs use it. Plus the acronym round-trip that silently corrupts names, and the rule that fixes it.

Related tools

Sources

Spotted a mistake in this article?