Ready to encode
Paste a URL or text and click Encode — or press Ctrl+Enter// encode & decode URLs instantly
Encode and decode URLs instantly in your browser. Supports encodeURIComponent, encodeURI, and full URI decoding — free, no sign-up required.
Ready to encode
Paste a URL or text and click Encode — or press Ctrl+EnterSelect Encode to convert plain text or a URL into percent-encoded form. Select Decode to reverse encoded strings back to readable text.
Use encodeURIComponent for query parameters and form values. Use encodeURI for full URL strings where slashes and colons must stay intact.
Click Copy to grab the result. Use Swap to push the output back into the input for chaining operations.
URL Encoder / Decoder converts text and URLs to and from percent-encoded format. Percent encoding replaces unsafe characters with a % followed by two hex digits so they can be safely transmitted in URLs. This tool supports both encodeURIComponent (strict) and encodeURI (full-URL) modes.
URL encoding (percent encoding) replaces characters that are not allowed in URLs with a percent sign followed by their two-digit hexadecimal UTF-8 value. For example, a space becomes %20 and an ampersand becomes %26.
encodeURI encodes a full URL and leaves structural characters like : / ? # & = untouched. encodeURIComponent encodes everything except letters, digits, and - _ . ! ~ * ' ( ), making it safe for encoding individual query parameter values.
No. All encoding and decoding happens directly in your browser using JavaScript. Your input text never leaves your device, so it is safe to use with sensitive URLs, tokens, or credentials.
The + sign as a space substitute is specific to application/x-www-form-urlencoded format used in HTML forms. Standard percent encoding always uses %20. Both are valid in different contexts, but %20 is safer for general use in URLs.
Swap copies the current output back into the input field so you can immediately re-encode or re-decode it. This is useful for fixing double-encoded strings or verifying a round-trip encode → decode is lossless.
Yes. The decoder handles strings that are only partially encoded, decoding every %XX sequence it finds while leaving plain text characters unchanged. This is helpful when working with URLs from logs or third-party APIs that apply inconsistent encoding.
Every URL that travels across the internet must consist only of a defined set of ASCII characters. When a URL needs to carry data that falls outside that safe set — spaces, special characters, Unicode text, or reserved symbols — those characters must be percent-encoded before transmission. The URL Encoder / Decoder on this page makes that conversion instant and reliable.
Percent encoding, formally defined in RFC 3986, converts each unsafe byte into a three-character sequence: a percent sign followed by two uppercase hexadecimal digits representing the byte value. A space (byte 0x20) becomes %20. A forward slash used inside a query value (byte 0x2F) becomes %2F. For multi-byte UTF-8 characters such as accented letters or emoji, each byte of the UTF-8 representation is encoded separately — so a single emoji can expand into a sequence of twelve or more characters.
JavaScript exposes two built-in encoding functions with different scopes. encodeURIComponent is the stricter of the two: it encodes everything except unreserved characters (letters, digits, hyphen, underscore, period, tilde). This makes it safe for encoding individual query parameter keys and values, redirect URIs, OAuth tokens, and anything that will appear inside a URL component.
encodeURI leaves the structural characters of a URL — colons, slashes, question marks, hash signs, ampersands, and equals signs — untouched. Use this mode when you have a complete URL and want to encode only the non-ASCII portions without breaking the URL structure.
q=hello%20world or q=hello+world depending on the encoding convention of the target API.+, /, or = (common in Base64) must be percent-encoded when placed in a URL.When reading server access logs, network traces, or responses from third-party APIs, URLs often appear in their encoded form. Decoding them manually to understand what a request actually contained is tedious and error-prone. Paste the encoded string into the decoder, switch to Decode mode, and the tool instantly restores the human-readable form so you can debug the issue without writing a single line of code.
A frequent mistake is encoding a URL twice. If a value has already been encoded and gets encoded again, %20 becomes %2520 because the percent sign itself gets encoded as %25. The Swap feature on this tool lets you verify a round-trip: encode a value, then swap and decode it — the output should match the original input exactly. If it does not, a double-encoding problem is present somewhere in the pipeline.