Slug Generator

Convert titles and phrases into URL-safe slugs. Accented Latin letters are transliterated; other non-ASCII characters, symbols, and emoji are removed.

  • Runs entirely in your browser
  • No data stored or sent to a server
  • Free forever — no signup
  • Instant conversion

Input and Output

Use the interactive encoder and decoder on this page to process your text.

Learn more about text

URL Slug Rules and Best Practices

Slug Generation

When to Generate Slugs

Convert titles, headings, and phrases into URL-safe slugs for blog posts, product pages, API routes, and file names. Accents are removed, special characters stripped, and spaces become hyphens.

Real-World Examples

Hello World!hello-world

Café & Crêpescafe-crepes

Blog title → permalink segment for static site generators

Common Mistakes

  • Changing slugs after publish — breaks bookmarks and SEO unless you add redirects
  • Overly long slugs truncated by CMS or filesystem limits
  • Assuming slug uniqueness — check for collisions in your database

Developer Tips

  • Keep slugs short, lowercase, and descriptive
  • Store a unique suffix or ID if titles repeat (e.g. my-post-2)
  • Libraries: slugify npm package for server-side generation

Frequently asked questions

What characters are allowed in slugs?

Output uses lowercase letters, numbers, and hyphens. Spaces and special characters are removed or converted.

How are accented characters handled?

Accented Latin letters are transliterated to ASCII equivalents (é → e, ñ → n). CJK, Cyrillic, Arabic, emoji, and other non-Latin scripts are removed rather than transliterated.

Are consecutive hyphens collapsed?

Yes. Multiple separators collapse to a single hyphen, and leading/trailing hyphens are trimmed.