To make a URL slug, paste your title into a slug generator and it returns a lowercase, hyphenated, accent-free version ready to drop into a link. So “My First Blog Post!” becomes my-first-blog-post. The free URL slug generator does it instantly in your browser, with no sign-up and nothing uploaded.
A slug is the readable tail of a web address, the part after the last slash that names the page. Getting it right keeps your links clean, shareable and easy for search engines to read.
What a slug is and why it matters
Compare two links to the same article:
example.com/p?id=4827
example.com/how-to-bake-sourdough
The second tells a reader what the page is before they click, survives being pasted into a chat or email without looking broken, and gives search engines plain words to work with. The slug is that human-readable part, and a good one is worth the few seconds it takes to generate.
The rules of a clean slug
A slug that behaves everywhere follows a short set of rules:
- Lowercase only. URLs can be case-sensitive on some servers, so mixing cases risks two addresses pointing at one page. Lowercase sidesteps the problem.
- Hyphens between words. Spaces are not allowed in URLs and get encoded into
%20, which looks ugly. Hyphens keep words separate and readable. - Letters, numbers and hyphens only. Punctuation, slashes and symbols either break the URL or get encoded into noise. Strip them.
- No accents. Accented letters get percent-encoded into long unreadable strings, so they are flattened to plain equivalents.
- Short and meaningful. A slug does not need every word of the title. Keep the words that describe the page and drop filler like “the” and “a”.
Doing all of this by hand for every title is tedious and easy to get wrong. A generator applies the rules consistently.
How to make a slug
Step 1: Paste a title
Drop in a post title, heading or product name, punctuation and all, into the slug generator.
Step 2: Read the slug
It is lowercased, accents are flattened, punctuation is removed, and spaces become hyphens automatically.
Step 3: Copy it
Paste the slug into your CMS, your route configuration, or a file name. Consistent slugs across a site keep your URLs predictable.
Why hyphens, not underscores
This trips up a lot of people, so it is worth being clear. For URLs, hyphens are the convention and underscores are not. Search engines have long treated a hyphen as a word separator, so red-shoes reads as “red shoes”. An underscore, historically, was read as joining words, so red_shoes could be read as the single token “red_shoes”. Hyphens give you two clean words; underscores risk one muddled one. Underscores still belong in code identifiers like snake_case, just not in web addresses.
Beyond URLs: file and folder names
The same tidy format makes excellent file names. Lowercase, hyphenated names with no spaces or odd characters behave identically across Windows, macOS and Linux, which spares you the broken-link and “file not found” headaches that spaces and accents can cause. If you generate slugs for your files as well as your URLs, everything stays consistent.
Picking a different case style
A slug is one specific format. If you need a code identifier instead, like camelCase or snake_case for a variable, the rules differ. See how to change text case without retyping for the full set of case styles.