Encode / Decode

Slug / URL-Friendly Text

?

About slugs

What is a "slug"?
A slug is the URL-friendly version of a string — lowercase, spaces replaced with hyphens, and any character that isn't a plain letter, digit, or separator stripped out. It's what you see after the last / in a blog post or product URL, e.g. /blog/hello-world.
Why are accented characters like é or ñ removed?
URLs are safest and most portable when restricted to plain ASCII — keeping é unencoded relies on non-ASCII URL support that not every system handles consistently, and percent-encoding it (%C3%A9) makes the URL far less readable. Slugifying transliterates é → e, ñ → n, and so on, trading a little precision for a URL that reads cleanly everywhere.
Why hyphens instead of underscores?
Search engines and most frameworks treat a hyphen as a word boundary — "hello-world" is indexed as two words — but generally do not treat an underscore that way, which historically hurt SEO. Hyphens became the de facto convention; underscores are still supported here for teams or systems that specifically expect them.
Can Unslugify perfectly recover the original text?
No — slugifying is lossy. Capitalization, punctuation, and any characters it stripped can't be recovered. Unslugify is a best-effort reverse that turns separators back into spaces and re-capitalizes each word; treat it as a way to make a slug readable, not to reconstruct the exact original title.
Does this tool upload my data anywhere?
No. Slugifying and unslugifying happen entirely in your browser using standard Web APIs. Nothing you type or paste ever leaves your device.

Configuration options

Use underscores
Uses _ as the word separator instead of the default -. Unslugify accepts either separator regardless of this setting, since a pasted slug might use either.
Preserve case
Skips forcing the slug to lowercase when slugifying, and skips re-capitalizing each word when unslugifying — useful for formats where case matters, like environment-variable-style identifiers.

Convert text to and from URL-friendly slugs.

input chars
0
output chars
0
status
idle