URL Encoder / Decoder
Encode or decode URLs live with component and full-URI modes. Copy each variant separately — perfect for query strings, paths and API work.
When do you need to encode or decode URLs?
What this tool does
This URL encoder and decoder converts plain text into percent-encoded form and back again, using the same rules as JavaScript’s encodeURI, encodeURIComponent, and their decode counterparts. Switch between Encode and Decode modes, pick component or full-URI encoding, and see both variants in reference cards below the main output. Copy any result with one click — no account, no upload.
Why you need it
URLs only allow a limited set of characters unescaped. Spaces, ampersands, hash signs, and non-ASCII text must be percent-encoded before they appear in query strings, path segments, or redirect targets. A single unencoded character can break analytics tags, OAuth callbacks, or deep links in mobile apps.
Developers reach for a URL encoder when building fetch requests, fixing broken links copied from logs, or decoding opaque tracking parameters. Security reviewers use it to inspect encoded payloads without sending sensitive tokens to third-party services. Because this tool runs entirely in your browser, API keys and session IDs in URLs never leave your device.
How to use it
- Paste the plain string or percent-encoded URL into the input field.
- Choose Encode or Decode from the toolbar, then pick Component (
encodeURIComponent) or Full URI (encodeURI) from the variant dropdown. - Review the live output in the main panel and compare both encoding functions in the variant cards.
- Use Copy result or the per-variant copy buttons, or click Swap to move the output back into the input for another pass.
Practical examples
- Query parameters: Encode
search=coffee & teatosearch=coffee%20%26%20teabefore appending it to an API URL. - OAuth and redirects: Decode a long
redirect_urifrom an authorization error page to see the exact callback URL the server received. - Internationalized paths: Percent-encode a Unicode city name for a slug or map link where the browser would otherwise truncate the request.
- Log forensics: Decode
%2Fapi%2Fv1%2Fusersfrom nginx access logs to confirm which endpoint was hit without mentally parsing hex pairs.
How it works
Percent-encoding (also called URL encoding) replaces each byte that is not allowed in a URI with a percent sign followed by two hexadecimal digits. For example, a space becomes %20 and an ampersand becomes %26. The two JavaScript variants differ in scope: encodeURI leaves structural characters such as :, /, ?, and # untouched because they delimit parts of a full URL. encodeURIComponent encodes those as well, which is why it is the safe choice for individual query values, form fields, and path segments inserted into a template.
Unicode text is converted to UTF-8 bytes before encoding, so emoji and accented letters produce multi-byte sequences like %F0%9F%98%80. Decoding reverses the process; malformed sequences (truncated pairs, invalid hex) throw an error rather than silently corrupting output. All transformations use native browser APIs — nothing is transmitted to Kitnax servers.
Common mistakes
- Double-encoding: Running
encodeURIComponenton text that is already percent-encoded turns%20into%2520. Decode first if you are unsure of the input state. - Wrong function for the job: Using
encodeURIon a query value leaves&and=unescaped, which can split the parameter at the wrong boundary. - Encoding the entire URL: Full-URI encoding is for strings that already contain scheme and host. Encode only the dynamic segment when building URLs programmatically.
- Assuming
+means space: In query strings, some servers treat+as a space (application/x-www-form-urlencoded). This tool follows standard URI percent-encoding where spaces are always%20.
FAQ
encodeURI vs encodeURIComponent?
encodeURI preserves URL structure characters like : and /. encodeURIComponent encodes nearly everything — use for query parameter values.
Why do spaces become %20?
Percent-encoding replaces unsafe bytes. %20 is the standard space encoding in URIs.
Can I decode malformed URLs?
Invalid sequences show errors. Fix truncated encodings before decoding.
Does it handle Unicode?
Yes. UTF-8 bytes are percent-encoded per standard URI rules.
Is my URL sent to a server?
No. Encoding and decoding happen in your browser only.