MSRX Tools

Slug Generator

Turn a title into a clean, URL-safe slug.

Everything runs inside your browser. Your files never leave your device.

Input

Result

The result appears here as you type.

Ask about Slug Generator

Questions about what this tool does, which option to pick, or what it can and cannot handle.

The question you type here is sent to an AI provider to be answered — your files and whatever you put in the tool above are not, and the assistant cannot see them. Answers are generated and can be wrong. The tool itself is not guessing: it runs deterministic code on your device.

About the Slug Generator

A slug is the readable part of a URL — the "how-to-make-bread" at the end of a recipe link. Turning a title into one means lowercasing it, replacing spaces with hyphens, and removing everything that has no business in a URL, which is a longer list than it first appears.

This does that, and handles the parts people usually get wrong. Accented characters are transliterated rather than stripped, so "café" becomes "cafe" instead of "caf". Punctuation, quotes and symbols are removed. Runs of separators collapse into one, and leading and trailing hyphens are trimmed, so a title ending in a question mark does not produce a slug ending in a dash.

Ampersands become "and" rather than disappearing, since "Salt & Pepper" reading as "salt-pepper" loses a word that was doing work. Numbers are kept, because they carry meaning in a title far more often than not.

Hyphens rather than underscores is the standard advice and it is worth following. Search engines treat a hyphen as a word separator and an underscore as a joining character, so "how_to_bake" is read as a single token while "how-to-bake" is read as three words. That difference is small but it is free.

Length is the judgement call the tool leaves to you. There is no technical limit worth worrying about, but a slug is read by people in link previews and search results, so cutting it after the meaningful words is usually better than carrying an entire headline. Trim the trailing words rather than abbreviating, and keep it stable — changing a published slug breaks every link to it unless you redirect the old one.

How to use it

  1. 1Type or paste the title you want turned into a slug.
  2. 2Read the result and shorten it if it has carried more of the headline than a URL needs.
  3. 3Keep hyphens as the separator unless something downstream insists otherwise.
  4. 4Once a slug is published, leave it alone — or redirect the old one, because every existing link points at it.

Questions

Hyphens or underscores?
Hyphens. Search engines treat them as word separators, while an underscore joins words into a single token. It is a small difference that costs nothing to get right.
What happens to accented characters?
They are transliterated to their closest unaccented equivalent, so “café” becomes “cafe” and “Zürich” becomes “zurich”. Stripping them instead would leave “caf”, which is a different word.
How long should a slug be?
Long enough to say what the page is about, short enough to read in a search result. Three to six meaningful words is a good target. Cut whole words from the end rather than abbreviating them.
Can I change a slug after publishing?
Only with a redirect. The old URL is in links, bookmarks and search indexes, and changing it without a 301 turns all of them into 404s and discards whatever ranking the page had earned.