URL Slug Generator

Convert any title or phrase into a clean SEO-friendly URL slug. All lowercase, words joined by hyphens, special characters removed. Same engine as kebab-case but tuned for URL safety.

Example: Best Coffee Shops in NYC (2025)best-coffee-shops-in-nyc-2025

URL slugs are the human-readable parts of a URL — the words after the last slash. "best-free-word-counters" is a slug. Good slugs are short, lowercase, hyphen-separated, and stripped of accents and special characters.

This tool normalises any title or phrase into a clean slug ready to drop into a URL. Internally it's the same as kebab-case with extra Unicode normalisation that strips diacritics — "Café" becomes "cafe", not "caf%C3%A9".

What people generate this for

Blog post URLs

Title in, slug out. Drop into your CMS as the post slug; the URL becomes both readable and search-friendly.

Product page URLs

Convert product names to slugs that work as URL paths. Avoids the ugly "%20" and "%C3%A9" encodings of unprocessed names.

File / folder names

For files and folders that may go in URLs, pre-slug the names to avoid Web-server URL-encoding surprises.

Search-engine optimisation

Google reads hyphens as word separators. A slug like best-coffee-shops ranks for "best coffee shops"; best_coffee_shops doesn't.

Migrating from underscored URLs

If you're moving from a snake_case URL convention to kebab-case (the SEO best practice), this tool helps batch-convert old paths.

How the randomness works

The slug generator applies a multi-step transformation pipeline. First, it decomposes accented characters using Unicode Normalization Form D (NFD), then strips combining diacritical marks with a regex matching \p{Mn}. Next, it lowercases the entire string and removes all characters not matching [a-z0-9\-] or whitespace. Sequences of whitespace are collapsed and replaced with hyphens. Finally, leading/trailing hyphens and consecutive hyphens are removed via /^-+|-+$|(-)+/g. The result is a safe URL segment conforming to RFC 3986 unreserved characters.

How to use this generator

  1. Paste or type your title or phrase into the input box.
  2. Click the 'Generate Slug' button (or the tool auto-converts on input).
  3. Review the generated slug in the output area.
  4. Copy the slug using the provided copy-to-clipboard button.

Behavior on tricky inputs

Empty input
Returns an empty string with no slug generated.
Only special characters
Returns an empty string as no valid characters remain.
Consecutive hyphens
Collapses into a single hyphen: 'foo---bar' becomes 'foo-bar'.
Leading/trailing hyphens
Stripped: '-foo-' becomes 'foo'.
Non-Latin scripts (e.g., Cyrillic)
Transliterated if possible via ICU rules; otherwise, remaining characters are stripped.

Tips for getting better output

  • To preserve a specific word like 'New York', manually replace spaces with hyphens before generating to avoid splitting: 'New-York'.
  • For very long titles, consider trimming to 50–60 characters to keep slugs readable and SEO-friendly.
  • If you need underscores instead of hyphens, a quick find-replace after generation works—but hyphens are the standard for URLs.
  • Use the tool with stop words removed first (e.g., 'the', 'and') to create shorter, punchier slugs.

vs other random sources

Compared to manual editing or other generators, this tool automates the entire slugification process with minimal setup.

This toolWordPress default slugPython slugify library
Accent handlingFull Unicode NFD decompositionSimple transliteration table, limitedUses Unicode NFKD + regex, configurable
Custom character mappingNot available (static rules)No, but manual editing possibleYes, via preprocessor parameter
Real-time conversionInstant on inputRequires clicking 'Edit' and savingN/A (code-only)
IntegrationWeb-based, copy-pasteBuilt into WordPress adminInstall via pip; programmatic use

A bit of history

The concept of a URL slug originated in newspaper publishing, where a 'slug' was a short, memorable label for an article. In web development, the term was popularized by Movable Type (2001) and later WordPress (2003), which automatically generated slugs from post titles. The algorithm followed by modern slug generators—lowercase, hyphen-separated, stripped of special characters—became a convention to ensure clean, human-readable URLs across the web.

FAQ

Slug vs kebab-case — same thing?

Almost. kebab-case is the same format. "Slug" specifically means a URL slug — kebab-case used in a URL path. The slug generator additionally strips diacritics and Unicode letters that kebab-case sometimes preserves.

How are accented letters handled?

The tool decomposes Unicode ("é" → "e" + combining acute accent) and strips the combining marks. So "Café" becomes "cafe". This matches modern SEO best practice.

Are emojis stripped?

Yes — emojis aren't valid in URLs without percent-encoding, which defeats the purpose of a clean slug. They're removed entirely.

Should I include numbers in slugs?

Yes if they're meaningful ("top-10-tips", "best-2025"). Avoid numeric IDs ("post-12345") if you can — descriptive slugs rank better.

Embed our tools on your website

Free for any site. No signup. Iframe loads from our servers and stays up-to-date automatically.

📋 Embed the Word Counter

Copy this snippet:

Live preview:

📋 Embed this URL Slug Generator

Copy this snippet:

Live preview:

Want more options? All embeddable tools →