URL Slug Generator

Generate URL-friendly slugs.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Paste a post title and press Run to get a URL-safe slug: lowercase words joined by single hyphens, with accents removed and punctuation dropped.

How to use

1
Step 1
Paste the title into Input.
2
Step 2
Press Run.
3
Step 3
Copy the slug and use it in your URL.

How it works

Accented letters are decomposed and their marks removed, so é becomes e, and ß, æ, œ, ø, ł, đ and þ are replaced with ss, ae, oe, o, l, d and th. Anything that is not a letter, digit, space, underscore or hyphen turns into a space, whitespace and underscores collapse to one hyphen, and leading or trailing hyphens are trimmed.

Worked example

A title with accents and symbols

Input
Café Münster: Top 10 Tips & Tricks!
Output
cafe-munster-top-10-tips-tricks
Walkthrough
Accents are stripped, the colon, ampersand and exclamation mark are dropped, and the words are joined with hyphens.

Limitations

  • Letters outside the Latin alphabet are removed: a title in Japanese or Arabic script produces an empty or partial slug.
  • The separator is always a hyphen and there is no length limit option.
  • Does not check whether the slug is already used.

Questions

What is a URL slug?
The readable last part of a web address, such as top-10-tips in example.com/blog/top-10-tips.
Does it remove accents?
Yes. Café becomes cafe.
What happens to non-Latin text?
Those characters are dropped. Transliterate the title first or write the slug by hand.
Can I use underscores instead of hyphens?
Not here. The tool always uses hyphens.

Features

  • Strips accents
  • Single hyphens, no edge hyphens
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • Learn Regular Expressions - Crash Course

    freeCodeCamp.org

    Regex powers many find/replace and clean-text workflows.

    Watch on YouTube
  • Learn JSON - Full Crash Course

    freeCodeCamp.org

    Structured text formats often sit next to plain-text tools.

    Watch on YouTube
  • String

    MDN

    JS string methods that mirror case, trim, and split tools.

  • UTF-8 and BOM

    W3C

    Encoding gotchas when cleaning pasted text.