Skip to content
K Knidox Search…
Computer Science · Text

Slug Generator

Turn any title into a clean, lowercase, hyphenated URL slug — accents stripped, updated as you type.

Separator
URL slug
my-first-blog-post-cafe-del-mar

31 characters

A URL slug is the human-readable part of a web address that names one page. This generator turns a title into a slug by lowercasing it, stripping accents, and swapping every space or symbol for a hyphen. So “My First Post!” becomes my-first-post — short, clean, and safe to put in a link.

Why slugs matter

The slug is the last, readable segment of a URL — the my-first-post in example.com/blog/my-first-post. A good slug tells both people and search engines what the page is about before they even open it, so descriptive keyword-rich slugs help SEO and click-through. The convention is lowercase ASCII letters and digits with hyphens between words: it stays readable, avoids case-sensitivity bugs on some servers, and needs no percent-encoding.

What the generator does

It normalizes accented letters to their plain ASCII form (so é becomes e), lowercases the text, replaces every run of spaces or punctuation with a single separator, then trims any separator left at the start or end. You can switch the separator to an underscore, keep the original case, or cap the length — the tool trims to the last whole word so a slug never ends mid-word.

Before and after

How common titles are transformed into slugs with the default settings.

Original titleSlug
My First Post!my-first-post
Café del Marcafe-del-mar
10 Tips for Better Sleep10-tips-for-better-sleep
Hello, World hello-world
C++ vs. C#: A Guidec-vs-c-a-guide
naïve Bayes & younaive-bayes-you

Things to watch for

Slugs should be unique on your site — two pages with the same slug will clash, so add a distinguishing word rather than a number where you can. Keep them reasonably short; long slugs get truncated in search results and are awkward to share. Once a page is published and linked, avoid changing its slug, because the old URL breaks unless you set up a redirect. Non-Latin scripts collapse to nothing here, so for those you may prefer transliteration before slugifying.

What is a URL slug?
The slug is the readable part of a URL that identifies a specific page — the my-first-post in example.com/blog/my-first-post. It usually comes from the page title, cleaned up into lowercase words joined by hyphens.
Should slugs use hyphens or underscores?
Hyphens. Google treats a hyphen as a word separator but reads an underscore as joining words together, so my-first-post is seen as three words while my_first_post can be read as one. Hyphens are the web standard for slugs.
Should a slug be lowercase?
Yes, keep slugs lowercase. Some servers treat /Page and /page as two different URLs, which splits links and confuses search engines. Lowercasing removes that ambiguity, so the tool lowercases by default — though you can turn it off.
How are accented letters handled?
They are normalized to plain ASCII before slugifying, so “Café del Mar” becomes cafe-del-mar and “naïve” becomes naive. This keeps the slug in the safe A–Z, 0–9 range that every browser and server handles without percent-encoding.
How long should a slug be?
Short enough to read at a glance — a handful of meaningful words is ideal. Use the max-length option to cap it; the tool trims to the last whole word within the limit so the slug never ends in a half-cut word.
Can I change a slug after publishing?
You can, but the old URL will stop working unless you add a redirect from it to the new one. Any existing links and search rankings point at the old slug, so it is best to settle on a slug before a page goes live.