URL Encode & Decode Online Free
Percent-encode any string for safe inclusion in a URL, or decode an encoded one back to its readable form.
In your browser—your files never leave your device.
Learn moreencodeURIComponent — encodes EVERY character except A-Z a-z 0-9 - _ . ~. Use for single query-string values or path segments where reserved chars (/:?#&) must be escaped.
Encoded URL will appear here…About this tool
URL encoding is the rule that says "anything that is not a letter, digit, hyphen, period, underscore, or tilde gets replaced with %HH where HH is the byte in hex." RFC 3986 defines the reserved set, and your stack normally handles it for you — until you are building a URL by hand, debugging a request that is mangled in transit, or comparing what one library produces against another. The classic case is a query parameter that contains an ampersand or a hash sign and breaks the URL when written raw. This tool uses encodeURIComponent for encoding and decodeURIComponent for decoding, both standard JavaScript built-ins, so the output matches what your fetch call would produce at runtime. Non-ASCII input gets the multi-byte UTF-8 percent-sequence that any RFC 3986 parser expects.
How to url encode & decode online free
-
Pick a direction
Encode turns text into percent-encoded form. Decode does the reverse, turning %20 back into a space and %3D back into an equals sign. Toggle at the top; switching clears the input so you do not run on stale text.
-
Paste your string
A full URL, a single parameter value, or any text — the tool processes whatever you paste without assuming the input is a complete URL. So you can encode just "hello world & friends" to get "hello%20world%20%26%20friends" without worrying about scheme or domain.
-
Read the output
Encoded or decoded result appears below the input as soon as it parses. Spaces become %20, ampersands become %26, slashes become %2F, et cetera. For decode, you get readable text. If decoding fails (malformed input) the message tells you so.
-
Copy and paste it where you need it
The copy button puts the result on your clipboard, ready for a curl command, a config file, a redirect URI registration, or wherever you are constructing URLs by hand. The Clipboard API works on all modern browsers including mobile.
Why use this tool
OAuth callback URLs are where I hit URL encoding most. The provider tells you to register a redirect URI that includes query parameters, and getting the encoding wrong gives you a redirect_uri_mismatch error that takes ten minutes to figure out because the page just says "no". Pasting both forms into this tool side by side ends the guessing in five seconds. The other case is debugging webhooks: a vendor sends a POST whose body or headers include a percent-encoded JSON blob, and you need to crack it open to see what the payload actually was. Decoding directly in a browser tab beats spinning up a Node REPL for one string. The third case is search engine results — querystrings with %20 and %3D everywhere — when I want to see what was actually searched. The fourth is building API URLs in shell scripts where bash variable interpolation has no idea about URL safety. The fifth is debugging mobile deep links and Android intents, which carry encoded payloads in their data URIs.
Features
encodeURIComponent under the hood
Encoding uses the standard browser function, the one MDN tells you to use for query parameter values. Output is byte-for-byte identical to what your fetch() or axios call produces at runtime. Letters, digits, and -_.~ pass through unchanged; everything else, including spaces, slashes, colons, and ampersands, becomes %HH where HH is the UTF-8 byte in two hex characters. The result is safe to drop into any URL component.
Both directions, one box
Toggle between encode and decode without retyping the input — the same field works both ways, and switching clears the box so you do not run the wrong direction by accident. Output updates as soon as the input is parsed, with no submit button to press. Useful when you want to verify a round-trip: encode, copy, paste back, decode, confirm you get the original.
Handles non-ASCII correctly
Encoding an em-dash, a CJK character, or an emoji produces the multi-byte UTF-8 percent-sequence that any RFC 3986 parser expects. Some older tools encode each Unicode codepoint as a single byte, which gives wrong results above U+007F and breaks compatibility with anything that follows the standard. This tool gets it right by relying on the built-in encodeURIComponent, which is mandated to do UTF-8 by the ECMAScript spec.
Decoder catches malformed input
A stray % followed by a non-hex character is a URI malformed error in decodeURIComponent — for example, "100% complete" cannot be decoded because the % is not followed by two hex digits. Instead of crashing or producing silently wrong output, the tool tells you the input was not valid percent-encoded text so you can fix it. Saves the case where you double-decode something and end up scratching your head.
Tells you which encoding family applies
There are actually three encoding contexts in browser-land: encodeURI for whole URLs (leaves structural punctuation alone), encodeURIComponent for parts of URLs (encodes everything), and the form-data path used by FormData and URLSearchParams (which is encodeURIComponent plus the +-for-space substitution). This tool encodes with the middle one — the right default for query parameter values, path segments, and JSON-in-URL payloads. If your destination needs the form-data variant with + instead of %20, do one find-and-replace on the output. If your destination needs the URL-shell-leave-it-alone variant, copy only the parts you actually need encoded.
Privacy & security
encodeURIComponent and decodeURIComponent are part of the JavaScript engine; they ship with your browser and do not call out to anything. Paste a presigned S3 URL with a signature in it, paste a session cookie value, paste a password-reset token — none of those ever leave your tab. The output box updates as fast as you type and the only network activity you will see in DevTools is the initial page load.