Slug Generator Developer Tool
Turn a title or heading into a clean, URL-safe slug.
Turning a blog post title or product name into a URL-friendly slug means lowercasing it, stripping punctuation, replacing spaces with a separator, and handling accented characters correctly — easy to get almost right and mildly annoying to get exactly right. This free slug generator is a developer tool that does all of that instantly in your browser, with control over the separator, case, and maximum length.
Input
Slug
Runs entirely in your browser — no data is sent anywhere.
What makes a good slug
A slug is the human-readable identifier that sits in a URL — the my-first-blog-post in /posts/my-first-blog-post. A good one is lowercase (URLs are technically case-sensitive, and mixed case invites duplicate-content confusion), uses a consistent separator between words, contains only URL-safe characters, and is short enough to read at a glance without being cryptic. It should also be stable once published: changing a slug later breaks any link, bookmark, or search engine result pointing at the old one, which is why most systems generate a slug once at creation time rather than recomputing it every time the title changes.
Handling accented and non-Latin characters
A title containing accented characters (Résumé, café) needs those characters transliterated to their closest plain-ASCII equivalent (resume, cafe) rather than stripped outright, since dropping them silently can turn two different words into the same slug. This tool does that by Unicode-normalizing the input (splitting each accented character into its base letter plus a separate combining accent mark) and then discarding the accent marks, which handles the vast majority of Latin-alphabet text correctly. Text in a non-Latin script (Cyrillic, Chinese, Arabic) has no equivalent 1:1 ASCII transliteration, so this approach necessarily drops those characters rather than guessing at a romanization — a system that needs slugs from non-Latin titles typically falls back to a generated ID or a manually-entered slug for that case instead.
Uniqueness is a separate problem
A slug generator can only make a URL-safe string out of the title you give it — it has no way to know whether that slug is already taken by another row in your database. "My First Post" and "My First Post!" both slugify to my-first-post, so any real application needs its own uniqueness check at save time, typically appending -2, -3, and so on until a free slug is found, or validating uniqueness and asking the user to adjust the title. In Laravel, that pairs naturally with a unique validation rule on the column and, once saved, route model binding on the slug column (Route::get('/posts/{post:slug}', ...)) to look the record up by it directly.
Common use cases
Beyond blog posts, slugs turn up anywhere a human-readable identifier is more useful than an opaque ID: product URLs in an e-commerce catalogue, category and tag pages, user profile URLs (/u/jane-doe), and file or asset names where spaces and special characters would otherwise need escaping. They're also commonly generated once and stored as a dedicated column alongside the primary key, rather than computed on the fly on every request, precisely so the URL stays stable even if the title is edited afterward.