Home / Tools / Slug Generator
Free tool · runs in your browser

Slug Generator

Turn a title into a clean, URL-safe slug. Accented characters are folded to their base letters rather than deleted, punctuation is stripped, and you can optionally drop stop words and cap the length. Paste several lines to convert them all at once.

How it works

What makes a good slug

A slug is the human-readable part of a URL. Good ones are lowercase, hyphen-separated, short enough to read at a glance, and descriptive of the page. Google’s documentation recommends hyphens as word separators and advises against underscores, since hyphens are treated as word boundaries.

Keep slugs stable. Changing one breaks every existing link and any accumulated ranking, so if you must change it, redirect the old URL with a 301.

How accented characters are handled

Text is normalised to Unicode NFD, which splits an accented letter into its base letter plus a combining mark, and the marks are then removed. A few letters with no decomposition are mapped explicitly — the German sharp s becomes ss, æ becomes ae, ø becomes o.

Apostrophes are removed rather than turned into separators, so it’s becomes its rather than it-s. Non-Latin scripts have no ASCII equivalent and are dropped — for those, either transliterate first or use the Unicode characters directly, which modern browsers and search engines handle.

Stop words and length

Removing stop words shortens a slug without losing much meaning. It is optional because it can read badly and the SEO benefit is marginal — a readable slug is worth more than a slightly shorter one. The first word is always kept so a title never becomes empty.

Capping length trims at a word boundary rather than mid-word. Around 60–75 characters is a sensible maximum.

What people use it for

  • Generating a blog or docs URL from an article title.
  • Creating a filename that is safe across operating systems.
  • Making an anchor or ID for a heading.
  • Converting a product name into a catalogue URL.
  • Batch-converting a list of titles during a site migration.

Nothing is uploaded. This tool runs entirely in JavaScript in your browser. Your input is never sent to a server, never logged and never stored, and no account is required. Once the page has loaded you can go offline and it still works — open your browser's network tab and watch if you'd like to confirm it.

Frequently asked questions

Should slugs use hyphens or underscores?

Hyphens. Google's documentation recommends them as word separators in URLs and advises against underscores, because hyphens are treated as word boundaries.

What happens to accented characters?

They are folded to their base letters using Unicode NFD normalisation, so cafe rather than caf. A few letters without decompositions are mapped explicitly, such as the German sharp s to ss.

What about non-Latin scripts?

Characters with no ASCII equivalent are dropped, which can empty a slug entirely. For those languages, either transliterate first or use the Unicode characters directly in the URL, which modern browsers and search engines handle.

Should I remove stop words?

It is optional and the benefit is marginal. A readable slug is usually worth more than a slightly shorter one. The option exists for when you want very short URLs.

Can I change a slug after publishing?

You can, but it breaks every existing link and any ranking the URL has accumulated. If you must, serve a 301 redirect from the old URL to the new one.

Tools that run where your code is

This page does its work in your browser because sending your data to a server to process it is a bad default. Catalase applies the same idea to AI coding: a free, open-source code editor that runs language models on your own machine through Ollama, with no account and no telemetry. Cloud models are there when you choose one, not by default.

Download Catalase freeWhat is Catalase?

Related tools

All 30 free developer tools →