Slug Generator

Published Updated

Turn titles into URL slugs, one per line, with hyphens, underscores or no separator, accents flattened and five stop words optionally dropped. Letters and digits of other scripts are kept in lower case, so Привет мир becomes привет-мир instead of an empty line.

Titles in, slugs out

Results of the page's code in Google Chrome 156, hyphen separator:

TitleSlug
How to Cook the Perfect Rice (stop words on)how-to-cook-perfect-rice
Crème brûlée & Café au lait!creme-brulee-cafe-au-lait
Ørsted Straße Æsop Łódźorsted-strasse-aesop-lodz
Don't Stop: It's AT&T's C++ Guidedon-t-stop-it-s-at-t-s-c-guide
100% Pure 2026100-pure-2026
--Hello___World-- hello-world
Привет мирпривет-мир

Hyphens or underscores

Google's URL structure guidance recommends hyphens over underscores to separate words, because they help people and search engines identify concepts in the address. Underscores are fine for file names and database keys, and the option is there for those. For a web page, keep the default.

Batch behaviour

A list is converted line by line. The input One Title, an empty line, Two Title and One Title again gave one-title, an empty line, two-title and one-title. Nothing is deduplicated, and a Windows line break counts as one. If two titles map to the same slug, add a number or a date yourself before using them as paths.

Making slugs

  1. Step 1

    Paste one title or many

    Each line is turned into its own slug, and blank lines stay blank in the output.

  2. Step 2

    Pick the separator

    Hyphen is the default. Underscore and None are the other choices, and the stop-word box removes a, an, the, and and of.

  3. Step 3

    Copy Result

    The slugs appear in the second box in the same order as the titles.

How accents are handled

  • Letters with accents are split into a base letter and a mark, and the marks are dropped: é becomes e.
  • Eight letters have their own rules: ø, ß, æ, œ, þ, ð, ł and đ turn into o, ss, ae, oe, th, d, l and d.
  • Everything is lower-cased, and runs of other characters collapse to one separator.
  • To change the case of the title first, Case Converter does it.

Slug questions

What happens to a Russian, Hebrew or Chinese title?

The letters and digits of any script are kept, in lower case where the script has it, and punctuation, spaces and emoji separate the words. So Привет мир becomes привет-мир. Accented Latin letters are still turned into plain ones. Only a line with no letters or digits at all gives an empty slug.

Why did Don't Stop become don-t-stop?

The apostrophe counts as a separator, so the t stands alone. The same happens with it's and AT&T. Remove the apostrophes before pasting if you want dont-stop.

Which stop words does it remove?

Five: a, an, the, and and of. Words like to, in and for stay. If every word is a stop word, as in The And Of, they all stay so the slug is not empty.

Does the slug have a length limit?

No. It is not shortened, so a long title gives a long slug. Trim it by hand to the few words that matter.

Are two identical titles given different slugs?

No. Identical lines give identical slugs. Add a number or date yourself where uniqueness is needed.

Are the titles uploaded?

No. The conversion is a short function in the page, and nothing is sent.

Related Tools