URL Slug Generator

URL slugs are SEO-friendly, readable URL identifiers. Conversion: lowercase, replace spaces with hyphens, remove special chars, transliterate accents (café → cafe). Good slug: "best-coffee-shops-seattle" (descriptive, keywords, hyphenated). Bad slug: "Post123" or "best_coffee_shops_seattle" (underscores less common). Max length: 50-60 chars for SEO. Remove stop words (a, the, and) for brevity. Use in CMS, blogs (post titles → slugs), e-commerce (product names). JavaScript: text.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, ""). Improves SEO, readability, sharing.

Convert text to URL-friendly slugs. Options for lowercase, separator choice (hyphen or underscore), max length, and transliteration for non-ASCII characters. Perfect for blog titles, product names, and SEO-friendly URLs.

Works OfflineDark ModeNo Ads

Enter Text

0 characters

Options

Separator:

Preview

Original0 chars

(empty)

URL Slug
0 chars

(empty)

What is a URL Slug?

A URL slug is the part of a URL that identifies a specific page in a human-readable format. Good slugs are lowercase, use hyphens to separate words, and avoid special characters.

Best Practices

  • Keep it short: 3-5 words is ideal for SEO
  • Use hyphens: Search engines treat hyphens as word separators
  • Lowercase only: URLs are case-sensitive; lowercase is standard
  • Remove stop words: Words like "a", "the", "and" can be omitted
  • Transliterate accents: Convert é to e, ü to u for compatibility

Common Use Cases

Blog Posts

"10 Tips for Better Sleep" → 10-tips-for-better-sleep

Product Pages

"Nike Air Max 90" → nike-air-max-90

Categories

"Electronics & Gadgets" → electronics-and-gadgets

File Names

"Annual Report (2024)" → annual-report-2024

How to Use

  1. Enter your value in the input field
  2. Click the Calculate/Convert button
  3. Copy the result to your clipboard

Frequently Asked Questions

What is a URL slug?
A URL slug is the last part of a URL that identifies a specific page in a human-readable format. In "example.com/blog/how-to-bake-bread", the slug is "how-to-bake-bread". Slugs are lowercase, hyphen-separated, and contain only alphanumeric characters. Good slugs are descriptive, SEO-friendly, and easy to read and share.
What makes a good URL slug?
A good URL slug is short (3-5 words, under 60 characters), descriptive, includes target keywords, uses hyphens (not underscores) to separate words, contains only lowercase letters, avoids special characters, and omits stop words (the, a, an, of, for) when possible. For example: "best-coffee-shops-nyc" is better than "The_Best_Coffee_Shops_In_New_York_City!!!!".
Should I use hyphens or underscores in slugs?
Always use hyphens (-), not underscores (_), in URL slugs. Google treats hyphens as word separators but treats underscores as word connectors. "coffee-shop" is read as two words, but "coffee_shop" is read as one word. Hyphens improve SEO and readability. This has been Google's official recommendation since 2005.
How do I create an SEO-friendly slug?
For SEO-friendly slugs: (1) Include your primary keyword early in the slug, (2) Keep it under 60 characters, (3) Remove stop words (a, the, of, for), (4) Use hyphens to separate words, (5) Use only lowercase letters, (6) Avoid dates unless content is time-sensitive, (7) Make it descriptive and readable. Example: for an article "10 Tips for Growing Tomatoes", use "tips-growing-tomatoes" or "grow-tomatoes-tips".
Should I include the year in my URL slug?
Only include the year if the content is time-sensitive or you regularly update it. For evergreen content like tutorials or guides, omit the year to avoid appearing outdated. For annual reports, tax guides, or trend articles, include the year: "tax-deductions-2026". Update URLs with new years can require redirects and lose SEO value, so avoid years unless necessary.
What characters are allowed in a URL slug?
URL slugs should contain only lowercase letters (a-z), numbers (0-9), and hyphens (-). Avoid uppercase, spaces, underscores, and special characters (!, @, #, $, %, &, etc.). Non-ASCII characters like é, ñ, or 中 should be transliterated to ASCII equivalents (e becomes e, 中 becomes zhong) or percent-encoded. Most modern browsers support Unicode in URLs, but ASCII-only slugs are safer for compatibility.
How long should a URL slug be?
Aim for 3-5 words or 30-60 characters. Shorter slugs are easier to read, remember, and share. They also display better in search results and social media. However, prioritize clarity over brevity — "wordpress-security-best-practices" (36 chars) is better than "wp-sec" (6 chars). Google does not penalize long URLs, but users prefer shorter ones.
Can I change a URL slug after publishing?
You can change a slug, but it requires a 301 redirect from the old URL to the new one to preserve SEO rankings and prevent broken links. Changing slugs frequently hurts SEO because search engines must re-index the page and you lose link equity from external sites pointing to the old URL. Only change slugs if absolutely necessary, and always implement proper redirects.

Related Tools