URL Encode / Decode
Percent-encode or decode text and URLs, component-wise or whole, all local.
Percent-encode or decode text and full URLs
This tool wraps the two built-in JavaScript encoders behind a mode and scope switch: Component mode uses encodeURIComponent, suitable for a single query value or path segment, while Full URL mode uses encodeURI, which leaves structural characters like colons, slashes, question marks and hash intact so it doesn't break an already-valid URL. Pick decode to reverse either one. It's a quick way to check what a query value or an entire link will look like once encoded, entirely in your browser tab.
How to use the URL Encode / Decode
- Choose Encode or Decode depending on which direction you need.
- Set Scope to Component if you're encoding a single value, or Full URL if you're encoding an entire URL and want its structural characters left alone.
- Paste or type your text into the left panel.
- Read the result on the right, or copy it, or send it on to another tool.
Component scope escapes reserved characters like &, =, ? and / because those are exactly the characters a query value or path segment must not contain unescaped; use it on a single parameter, not on a URL that already has its own structure.
Full URL scope leaves :/?#[]@!$&'()*+,;= mostly untouched by design (that's what encodeURI does), so encoding an already-valid URL in this mode won't double-encode its existing structure, only spaces and other unsafe characters get escaped.
Frequently asked questions
- What's the difference between Component and Full URL scope?
- Component scope (encodeURIComponent) escapes reserved characters such as & and = for use inside a single value, while Full URL scope (encodeURI) preserves a URL's own structural characters like :, /, ? and # so the link stays valid.
- Why did encoding my full URL not escape the slashes?
- That's expected in Full URL scope, encodeURI intentionally leaves slashes, colons and other structural characters alone so it doesn't corrupt a URL that's already correctly formed; switch to Component scope if you want everything escaped.
- Does this tool send my text anywhere to encode it?
- No, encoding and decoding both call JavaScript's built-in encodeURIComponent, encodeURI and their decode counterparts directly in the page, so text with tokens or credentials in it never leaves your browser tab.
- Why does decoding sometimes throw an error?
- decodeURIComponent and decodeURI both throw on a malformed percent sequence, such as a stray % not followed by two hex digits, so an error usually means the input wasn't valid percent-encoded text to begin with.