Skip to content

Slug Generator

Convert a title into a URL slug as you type. Choose hyphen or underscore, case and a maximum length; accents become ASCII. One title per line for bulk.

35 characters
  • 10-things-i-wish-i-knew-about-oklch
Try an example
Separator
Case
60 characters

Drag to 0 for no limit. Longer slugs are cut at the last whole word that fits.

01 · Definition

What is a URL slug?

A URL slug is the part of a web address that names one page in readable words, such as my-first-post in example.com/blog/my-first-post. A slug is normally lower case, uses hyphens in place of spaces and leaves out punctuation, which makes the address easy to read, type and share.

02 · Overview

How the Slug Generator works

Turn a title or any string into a clean URL slug. The slug updates as you type and sits directly under the input. You can choose hyphen or underscore, lower case, upper case or as typed, a maximum length of up to 120 characters that cuts at a whole word (0 means no limit), and conversion of accented Latin letters to ASCII (é to e, ß to ss). Emoji and punctuation are removed. Paste a list with one title per line to slugify them all. The tool runs in your browser.

03 · Guide

How a title is turned into a slug

The tool applies the same steps to every line, in this order: convert accented Latin letters to ASCII, replace anything that is not a letter, digit, space, hyphen or underscore with a space, change case, collapse each run of spaces, hyphens and underscores into one separator, trim separators from both ends, then shorten to the maximum length at a word boundary.

Punctuation inside a word therefore splits it: an apostrophe or a full stop becomes a separator. The outputs below were produced by running the tool's slugify function with its default settings (hyphen, lower case, 60 characters, accents converted) unless the row says otherwise.

RuleInputSlug
Spaces become the separatorHello Worldhello-world
Runs of spaces and symbols collapseMultiple -- spaces & symbols!!multiple-spaces-symbols
Accents are convertedCafé Olé — naïve résumécafe-ole-naive-resume
ß and æ expand to two lettersStraße & Ætherstrasse-aether
Emoji are removedHello, world! 🚀hello-world
Apostrophes split wordsIt's 9 o'clockit-s-9-o-clock
Symbols are dropped, not spelled outC++ vs C#c-vs-c
Underscores become the separatorsnake_case and kebab-casesnake-case-and-kebab-case
Other scripts are keptПривет мирпривет-мир
Maximum length 20 cuts at a wordThe quick brown fox jumps over the lazy dogthe-quick-brown-fox
Underscore separatorHello Worldhello_world
Slug rules with real output

04 · Use cases

When to use the Slug Generator

  1. 01

    Convert a blog post title into a SEO-friendly URL slug

  2. 02

    Bulk-slugify a list of product names

  3. 03

    Turn a file or page name into a URL-safe string

  4. 04

    Strip emoji and accents from a title

05 · Examples

Slug Generator examples

10 Things I Wish I Knew About OKLCH

ex 01

10-things-i-wish-i-knew-about-oklch

The title is lowercased and spaces become hyphens.

Café Olé — naïve résumé

ex 02

cafe-ole-naive-resume

Accented characters are transliterated and punctuation is stripped.

Ürün Açıklaması Sayfası

ex 03

urun-aciklamasi-sayfasi

Turkish diacritics are transliterated to their closest ASCII equivalents.

Multiple spaces & symbols!!

ex 04

multiple-spaces-symbols

Runs of whitespace collapse to one separator; punctuation is dropped, not encoded.

06 · FAQ

Slug: frequently asked questions

Are emojis stripped or transliterated?

They are stripped, along with punctuation and symbols. Only letters, digits and the separator survive. "Hello, world! 🚀" becomes hello-world. Punctuation inside a word acts as a word break, so "It's" becomes it-s.

What happens to accents and non-Latin scripts?

With the accent option on, accented Latin letters are converted: é to e, ñ to n, ø to o, ß to ss, æ to ae. Letters from other scripts, such as Cyrillic, Greek or Chinese, are kept as they are, since the tool has no romanisation tables for them. Browsers percent-encode those characters in a URL.

What's the difference between - and _ separators?

Google's URL guidance recommends hyphens to separate words and advises against underscores. Use hyphens for public URLs. Underscores are mainly useful for file names and identifiers.

How long should a slug be?

Three to five meaningful words is a good target. The slider defaults to 60 characters and goes up to 120; drag it to 0 for no limit. When a slug is too long the tool cuts it at the last whole word that fits, so you do not get half a word, and the header says it was shortened.

What happens if I change a slug after publishing?

The old URL stops working, including links other sites and search engines already hold. If you have to change it, serve a 301 redirect from the old slug to the new one and keep it in place.

Should slugs be lowercase?

Yes. URL paths are case-sensitive under RFC 3986, so /My-Post and /my-post are different URLs. Some servers treat them as the same and some do not, which can leave one page reachable at two addresses. Lower case is the default here.

07 · Reference

Specs and further reading

These are the primary sources this tool follows. Where a specification defines the behaviour, we link the specification, not a summary of it.

08 · More

Tools that pair with Slug

Last updated .