Slugify a URL: create clean slugs that stay stable (and why stability matters)
A slug is the part of a URL that identifies a page in a readable way, like your-domain.com/blog/slug-goes-here.
If slugs change after you publish, links break, analytics splits, and people lose trust. The goal is not a clever slug; the goal is a stable one.
Start here:
- Open the slugify tool.
- Paste a title, then copy the slug.
- Keep the slug stable; if you must change it, add a redirect.
What a slug is, and why you should care
A good slug is:
- readable at a glance
- safe for URLs
- consistent across your site
Most importantly, it does not change every time someone edits the headline. URLs get shared and bookmarked. Treat them like an API.
Examples (with the default RFC3986 preset)
Textavia's slugify tool defaults to an RFC3986-style slug: lowercase, hyphen-separated, and URL-safe.
| Input | Output slug |
|---|---|
Hello, world! | hello-world |
What's new in Q4: 10% faster search | what-s-new-in-q4-10-percent-faster-search |
C# and .NET: tips | c-and-net-tips |
__Already_a_slug__ | already-a-slug |
spaced out | spaced-out |
Two things to notice:
- Punctuation gets removed or turned into separators.
- Repeated separators collapse into one by default.
Pick a slug style once, then stick to it
The fastest way to create broken links is to let multiple styles creep in. Decide what you want and keep it consistent:
kebab-casefor URLs is the most common (my-new-post)snake_caseshows up in code and some systems (my_new_post)Title Casebelongs in headings, not slugs
If you already have text in a specific case, you can normalize it first:
- Convert headings with the title case converter.
- Convert identifiers with the kebab-case converter.
Slugify tool settings that matter
Preset mode
Use RFC3986 (lowercase, URL-safe) for most URLs. It keeps slugs consistent and avoids weird casing issues.
Use Pretty (preserve case) only if you have a strong reason to keep capitalization.
Separator character
Hyphens work well in URLs and look natural. If you need underscores for a legacy system, set the separator to _, but keep it consistent.
Strict mode
Strict mode limits output to alphanumeric characters only. That can be useful for systems that reject punctuation, but it can make slugs harder to read.
Trim and collapse
Leave these on unless you have a reason:
Trimprevents leading and trailing separators.Collapseprevents---sequences after punctuation.
Avoid these slug mistakes
- Packing in every keyword: Long slugs are harder to scan and easier to mistype.
- Changing slugs after publishing: Use redirects if you must.
- Using dates or changing numbers: If you include a year, you will want to update it later.
- Encoding instead of slugifying:
%20is not a slug. Encode values, slugify titles.
If you find yourself with % sequences in a path segment, you probably want a slug, not URL encoding. Use slugify, not the URL encoder.
How to use Textavia's slugify tool
- Open the slugify tool.
- Keep the
RFC3986preset for consistent, lowercase slugs. - Copy the output and use it as your URL path segment.
FAQs
Should I include stop words like "a", "the", and "and"?
If your slug stays readable, it is fine. The bigger risk is changing the slug later, not having a few extra short words.
Do slugs affect SEO?
They help users understand a link, and they can improve clarity when a URL is shared. The biggest SEO win is keeping URLs stable and using redirects when you change them.
Does slug generation run locally?
Yes. Slugify runs in your browser.
Tips and proven approaches
- Write the headline for humans, then slugify it. Do not force the headline to match the URL.
- Keep slugs short enough to read in a chat preview.
- If you need to remove a specific character set (like
()), use theCharacters to removeoption instead of editing by hand.
Related tools
- Normalize capitalization with the title case converter.
- Convert to URL-style casing with the kebab-case converter.
- Decode messy path values with the URL encoder/decoder.
Privacy and security
Slug generation runs locally in your browser. Your input is not uploaded to a server.
