PureDevTools

URL Slug Generator

Convert any text to a clean, SEO-friendly URL slug — custom separator, case mode, and max-length support, all in your browser

All processing happens in your browser. No data is sent to any server.

Input Text

0 characters

Options

Word Separator

Case

Max Length (0 = unlimited)

Generated Slug

Your slug will appear here…

Your blog post title is “10 Résumé Tips — How to Stand Out (2024 Edition)”. The URL slug needs to be 10-resume-tips-how-to-stand-out-2024-edition — lowercase, accented characters normalized, special characters removed, spaces replaced with hyphens, and the em dash gone. Doing this manually for every post is error-prone; one uppercase letter or stray character means inconsistent URLs.

Why This Generator (Not a Manual Approach)

Most CMS platforms auto-generate slugs, but they don’t all handle accented characters, custom separators, or maximum length the same way. This tool gives you full control — custom separators (hyphen, underscore, dot), case options, max length truncation, and Unicode normalization for accented characters like ée and üu. Everything runs in your browser.

What Is a URL Slug?

A URL slug is the human-readable part of a web address that identifies a specific page. For example, in the URL https://example.com/blog/how-to-use-git-rebase, the slug is how-to-use-git-rebase. Slugs are lowercase, use hyphens to separate words, and contain only alphanumeric characters — making them both readable for humans and safe for browsers.

Good slugs improve search engine rankings, make URLs easier to share and remember, and reflect the content of the page to both users and crawlers.

How This Tool Works

Paste any text into the input field and the slug is generated instantly. The transformation pipeline:

  1. Diacritic normalization — accented characters are converted to their ASCII base form (é → e, ñ → n, ü → u, ç → c, etc.)
  2. Non-ASCII removal — characters outside the ASCII range that cannot be transliterated (CJK, Arabic, etc.) are removed
  3. Special-character stripping — punctuation, symbols, and whitespace sequences are replaced with the chosen separator
  4. Case transformation — the result is lowercased, uppercased, or kept as-is depending on your setting
  5. Separator cleanup — consecutive separators are collapsed into one, and leading/trailing separators are trimmed
  6. Max-length enforcement — if a limit is set, the slug is cut at the nearest word boundary so no word is sliced in half

Separator Options

The separator is the character inserted between words in the slug:

For most web URLs and SEO purposes, the hyphen is preferred. Google’s John Mueller has confirmed that Google treats hyphens as word separators, making hello-world better for search indexing than helloworld or hello_world.

Case Modes

Max Length

URLs should generally be kept under 75–100 characters for readability and SEO. The max-length option trims the slug at the nearest separator boundary so words are never cut in half. For example, if the limit is 20 and the slug would be quick-brown-fox-jumps, the result might be quick-brown-fox (trimmed at the separator before the cut point).

Common max-length recommendations:

Accented Character Support

The slug generator handles the full Latin extended character set:

InputOutput
Résuméresume
Crêpescrepes
Ñoñonono
Straßestrase
Björkbjork
Überuber
Kévinkevin

Characters outside the Latin script (Chinese, Japanese, Korean, Arabic, Cyrillic, etc.) are removed entirely because one-to-one transliteration requires a large dictionary lookup and would add significant JavaScript bundle weight. If you need CJK transliteration, consider pre-processing with a library like pinyin (Chinese) or wanakana (Japanese).

Common Use Cases

CMS and Blog Platforms

Every major content management system generates slugs automatically, but they sometimes produce suboptimal results (duplicated words, numbers appended for uniqueness, excessive length). Use this tool to craft a precise slug before entering it into WordPress, Ghost, Contentful, Strapi, or any headless CMS.

Static-Site Generators

Tools like Hugo, Jekyll, Gatsby, and Astro use file names or front-matter slug fields to determine URLs. This generator helps you produce consistent, SEO-friendly slugs for your content files.

E-commerce Product URLs

Product slugs in platforms like Shopify, WooCommerce, and BigCommerce affect both click-through rates and rankings in Google Shopping. A clean slug like wireless-noise-cancelling-headphones is more descriptive than a SKU-based URL.

API Route and Identifier Generation

When designing REST APIs or GraphQL schemas, you may need URL-safe identifiers from human-readable names. This tool generates slug identifiers for tags, categories, topics, and other resources.

Internationalized Content

If you publish content in multiple languages, each article needs a URL-safe slug in the target locale. This tool normalizes accented characters from French, Spanish, German, Portuguese, and other Latin-script languages into ASCII slugs.

SEO Best Practices for URL Slugs

Frequently Asked Questions

Can I use this for YouTube video IDs or other auto-generated identifiers? No — auto-generated platform IDs (YouTube, Twitter, etc.) are opaque strings that cannot be reverse-engineered. This tool is for converting human-readable text into URL-safe slugs, not for decoding platform identifiers.

What happens to numbers in the input? Numbers are preserved as-is. Product 42 Review becomes product-42-review.

Does removing special characters affect SEO? No. Special characters like &, @, %, and # have special meaning in URLs and must be percent-encoded or removed. Clean slugs without these characters are always better for SEO and user experience.

Why are Chinese/Japanese characters removed? Transliterating CJK characters to Latin requires a large dictionary that would significantly increase page load time. For CJK content, a pre-processing step with a dedicated library (e.g., pinyin for Mandarin) is recommended before using this tool.

Is my text sent to a server? No. All slug generation happens entirely in your browser using JavaScript. No text or data is ever transmitted to any server. This tool works offline once the page is loaded.

What is the difference between a slug and a URL? A URL (Uniform Resource Locator) is the complete web address, including protocol, domain, path, and query parameters. A slug is only the path segment that identifies a specific page — the how-to-use-git-rebase part of https://example.com/blog/how-to-use-git-rebase.

Related Tools

More Text & String Tools