Slug Generator
Turn any title or sentence into a clean, lowercase, hyphen-separated URL slug — instantly, in your browser.
We use cookies and similar technologies to enhance your browsing experience, analyze site traffic, and personalize content and ads. By clicking "Accept", you consent to our use of cookies. Learn more in our Privacy Policy.
Turn any title or sentence into a clean, lowercase, hyphen-separated URL slug — instantly, in your browser.
A slug is the human-readable part of a URL that identifies a page, like the post-title section of a blog address. This tool takes any title or phrase and turns it into a clean slug: lowercase, words joined by hyphens, accents normalized to plain ASCII, and punctuation and stray symbols stripped out. Paste a title, get back something safe to drop straight into a route, a filename, or a CMS permalink field.
Everything happens in your browser. The text you type is processed locally with JavaScript and is never sent to a server, so you can run product names, draft headlines, or internal document titles through it without anything leaving your machine. There's no account, no rate limit, and no upload step. It's meant to be the small utility you reach for when you're naming a page and want a predictable, URL-safe result instead of hand-editing spaces and capital letters every time.
The tool runs a short, predictable pipeline over your input:
My Post and my post produce the same slug.Café becomes cafe and naïve becomes naive.a -- b doesn't yield a---b.? doesn't leave a dangling -.The result only ever contains a-z, 0-9, and -. That character set is safe in a URL path without percent-encoding and works equally well as a filename on every common operating system. Because the steps are deterministic, the same title always produces the same slug, which matters when you need stable, reproducible links.
Suppose you're publishing an article titled:
How to Deploy Node.js in 2024 — A Beginner's Guide!
Walking through the pipeline:
how to deploy node.js in 2024 — a beginner's guide!. in node.js, the spaces, the em dash, the apostrophe, and the ! are all non-alphanumeric, so each run becomes a hyphen.Final slug:
how-to-deploy-node-js-in-2024-a-beginner-s-guide
Notice two things. node.js becomes node-js, not nodejs, because the dot is treated as a separator rather than removed. And beginner's becomes beginner-s, because the apostrophe is also a separator. If you'd rather have beginners or nodejs, edit the title before generating, or tidy the slug afterward. Slug generation is intentionally conservative: it never guesses which characters you meant to keep, it just guarantees the output is valid.
Slugs show up anywhere a name needs to become a stable identifier:
/blog/<slug> segment./projects/internal-dashboard) instead of a numeric ID.id attributes for in-page links.The common thread is wanting a value that is readable by a human, safe in a URL or path, and identical every time it's derived from the same source string.
A few things that trip people up:
C++ and C both reduce toward c). If you store slugs as keys, add a uniqueness check and append a counter like -2 when a collision happens.Top 10 becomes top-10, which is fine, but a title that's only symbols (like !!!) reduces to an empty string. Have a fallback ready.URLs have a defined grammar. The path segment allows unreserved characters (A-Z a-z 0-9 - . _ ~) directly; anything else must be percent-encoded, so a space becomes %20 and an accented é becomes a multi-byte %XX%XX sequence. Encoded URLs still work, but they're ugly to read, easy to mangle when copied into chat or email, and inconsistent across tools that encode differently.
By restricting output to lowercase letters, digits, and hyphens, a slug sidesteps all of that. The hyphen is the conventional word separator because it's unreserved and search engines treat it as a word boundary, whereas underscores are sometimes read as joining two words. Lowercasing matters too: URL paths are case-sensitive on most servers, so My-Page and my-page can resolve to different resources. Forcing lowercase removes a whole class of "works on my machine" bugs where a link breaks only because someone typed a capital letter.
It's the readable identifier in a URL that names a specific page, usually derived from its title. In `example.com/blog/getting-started`, the slug is `getting-started`.
URL paths are case-sensitive on most web servers, so `My-Page` and `my-page` can point to different resources. Forcing lowercase keeps links consistent and avoids accidental 404s.
Hyphens. Search engines treat a hyphen as a word separator, while underscores can be read as joining two words together. Hyphens are the widely followed convention for URLs.
Accented letters are normalized to their plain ASCII equivalent where one exists (`é` to `e`), and any remaining symbols, punctuation, or spaces become hyphens. The output only contains a-z, 0-9, and -.
No. Different titles can reduce to the same slug, so if you use slugs as identifiers you should add a uniqueness check in your own system and append a suffix like -2 when needed.
No. Slug generation runs entirely in your browser with JavaScript. Nothing you type is uploaded or stored on a server, so it's safe for unpublished titles and internal names.
Yes. The lowercase, hyphenated, ASCII-only output is valid on every common operating system, sorts predictably, and survives being copied between machines without encoding issues.
That happens when the title is made up entirely of characters that get stripped, such as pure punctuation or a script with no ASCII equivalent. Add some Latin text or transliterate the title first.