URL Slug Generator

Quick answer: Turn a title into a clean URL slug: accents removed, spaces and punctuation replaced by a single separator, and lowercase by default.

Updated

Your text is processed entirely in this browser and is never sent to a server.

How to create a slug

  1. Paste a title, heading or product name.
  2. Pick the separator (- or _), keep or turn off lowercase, and set a maximum length if needed (0 means no limit).
  3. Copy the slug into your CMS, router or file name.

Examples

Blog post title

Before

Crème Brûlée: A Beginner's Guide!

After

creme-brulee-a-beginners-guide
Numbers and brackets

Before

10 Tips for Café Owners (2024 Edition)

After

10-tips-for-cafe-owners-2024-edition
Underscore separator

Before

Đà Lạt Travel Guide

After

da_lat_travel_guide
Maximum length 30, cut at a word boundary

Before

How to Remove Accents from Text in JavaScript

After

how-to-remove-accents-from

When to use it

  • Create readable URLs for blog posts, landing pages and product pages.
  • Name files, folders or image assets consistently.
  • Generate anchor IDs for headings in documentation.
  • Build keys or identifiers from human-readable titles.
  • Turn multilingual titles with accents into ASCII-friendly paths.

How the slug is built

The tool removes accents from Latin letters (é → e, ñ → n, đ → d), deletes apostrophes (both ' and ’) without leaving a gap so “don’t” becomes “dont”, and replaces every other run of spaces, punctuation, symbols, emoji or line breaks with one separator. Separators at the start and end are trimmed, so you never get double or dangling hyphens.

When a maximum length is set, the slug is cut at the last word boundary that fits whenever possible, instead of in the middle of a word. Pasting several lines produces one slug, not one slug per line.

Letters from non-Latin scripts such as Cyrillic or Chinese are kept. Modern browsers display them fine, but they are percent-encoded in the raw URL, so consider writing an English or transliterated slug for those pages. Hyphens are the usual choice for web URLs because search engines treat them as word separators; underscores are more common in file names and code identifiers.

Frequently asked questions

Should I use hyphens or underscores?

For web pages, hyphens are the common convention and Google recommends them for separating words in URLs. Underscores are fine for file names, database keys or code.

How long should a slug be?

There is no fixed limit, but short slugs of a few meaningful words are easier to read and share. Use the max length option to cap long titles.

Can I keep uppercase letters?

Yes. Turn off the lowercase option. Keep in mind that many servers treat URLs as case-sensitive, so mixed case can create duplicate addresses.

Should I change the slug of a page that is already published?

Only with a good reason. If you do, set up a 301 redirect from the old URL so existing links and search rankings are not lost.