About Slug / URL Encoder
Two related jobs in one place: turning a headline into a permalink that will not break, and repairing a URL whose spaces, accents or ampersands have already been mangled. Handy for CMS imports and file naming, where one stray character costs an afternoon.
Turn any title or heading into a clean, URL-safe slug, or encode and decode URLs that contain spaces and special characters. Good slugs are lowercase, hyphenated and free of punctuation, which makes links readable and friendlier for search engines.
Use it for permalinks, file names, anchor links and anywhere else that needs a tidy, shareable string. Getting it right before publishing matters, because changing a slug afterwards breaks every link already pointing at it.
A good slug is lowercase, hyphen-separated and free of anything that needs escaping, because URLs may only contain a restricted ASCII set and everything else has to be percent-encoded. That is why a space becomes %20 and why a title with an accent or an ampersand produces a link that is ugly, fragile and easy to break when it is copied into an email or a chat message that re-encodes it.
Slug choices are close to permanent, which is the part worth pausing over. Every link, bookmark and search result pointing at a page uses its slug, so changing one breaks all of them unless a redirect is put in place — and redirects accumulate as maintenance debt. Two conventions help: leave dates out unless the content is genuinely time-bound, and drop filler words rather than the words carrying meaning, so a long headline becomes a short slug that still says what the page is.
Common use cases
- Turning an article headline into a permalink before publishing in a CMS.
- Cleaning a batch of titles into consistent slugs during a content migration.
- Repairing a URL that arrived with spaces or accented characters already mangled.
- Producing safe file names from titles for downloads or exports.
- Creating anchor identifiers for headings within a long document.