URL Encoder & Decoder
Percent-encode and decode URLs and query string components — instantly, privately, in your browser.
Component encodes every reserved character (use for query string values). Full URI preserves URL structure (:, /, ?, #).
Private by design
URLs are processed locally. Nothing is uploaded, logged, or stored on a server.
Real-time conversion
Encoding and decoding happen as you type, with no round-trip to a server.
Component or full URI
Switch between encodeURIComponent and encodeURI behavior to match your use case.
What is URL encoding?
URLs can only safely contain a limited set of characters. Anything outside that set — spaces, non-ASCII letters, punctuation reserved for URL syntax (?, &, =,/, #) — must be escaped using percent-encoding. Each unsafe byte is replaced with a three-character sequence: a % followed by two hexadecimal digits.
URL encoding is used everywhere on the web: in query string parameters, OAuth callbacks, REST API paths, redirects, tracking links, and form submissions. Decoding lets you read what a URL actually contains — useful for debugging analytics URLs, share links, and webhook payloads.
Component vs. full URI encoding
JavaScript exposes two encoding functions and you almost always want the component variant. encodeURIComponentescapes every reserved character, which is what you need when you're embedding a value inside a URL — for example a search query, a path segment, or a redirect target.encodeURI assumes the input is already a complete, well-formed URL and leaves structural characters like :,/, ?, and # alone.
Frequently asked questions
›What is URL encoding (percent-encoding)?
URL encoding — also called percent-encoding — converts characters that aren't safe to transmit inside a URL (spaces, &, ?, /, #, non-ASCII characters, emoji) into a %HH escape sequence representing their UTF-8 bytes. For example, a space becomes %20 and the ampersand becomes %26.
›When should I use encodeURIComponent vs encodeURI?
Use encodeURIComponent (the 'Component' mode in this tool) for individual pieces of a URL such as a query string value, a path segment, or a fragment. It encodes reserved characters like &, =, ?, /, and #. Use encodeURI (the 'Full URI' mode) when you have a complete URL that is already structured correctly and you only want to escape unsafe characters like spaces while keeping :, /, ?, & intact.
›Why does my URL contain %20 or + instead of spaces?
Both are valid representations of a space character in a URL. %20 is used in URL paths and is the standard percent-encoding. The plus sign (+) is used to encode spaces inside the application/x-www-form-urlencoded body of HTML forms and inside query strings on many platforms. This tool uses %20 because it works correctly in every context.
›Is URL encoding the same as Base64 encoding?
No. URL encoding makes a string safe to embed in a URL by escaping reserved and unsafe characters with %HH sequences. Base64 encoding converts arbitrary binary data into a 64-character ASCII alphabet so it can be transmitted as text. They solve different problems and produce very different output.
›Does this tool send my URLs to a server?
No. All encoding and decoding runs locally in your browser using the standard JavaScript encodeURIComponent, decodeURIComponent, encodeURI, and decodeURI APIs. Your input is never uploaded, logged, or stored.
›Can I decode a URL that contains invalid escape sequences?
If the input contains a malformed percent-escape (for example a stray % not followed by two hex digits), decoding will fail with an error such as 'URI malformed'. Fix or remove the broken sequence and try again. You can also switch to 'Full URI' mode to be more permissive about reserved characters.
›Does it handle Unicode characters and emoji?
Yes. Non-ASCII characters and emoji are first encoded as UTF-8 bytes, and each byte becomes a %HH escape. Decoding reverses the process, so multilingual text and emoji round-trip cleanly.
More free developer tools
Part of our growing tool belt — all client-side, all free.