URL Encoder / Decoder
Encode and decode URLs online instantly. Supports both whole-URL (encodeURI) and single-component (encodeURIComponent) modes, multi-line batch processing, and runs entirely in your browser β your input is never sent to a server.
hello world&x=1hello%20world%26x%3D1How to use the URL encoder / decoder
-
Paste your text
Type or paste the string you want to encode or decode into the input area. Batch mode handles multiple lines automatically β every non-empty line is converted independently.
-
Choose Encode or Decode
Select your direction, then pick Component for query parameter values or Full URL to preserve URL structure. The mode explainer shows a live example for the active mode.
-
Copy the result
Click Copy or press Ctrl+Shift+C to copy the output. Use Swap to round-trip your conversion β the direction flips automatically so a second click re-converts.
URL encoding examples
See how URL encoding transforms special characters, spaces, and non-ASCII text. You can encode URL query strings, decode percent-encoded URLs, and URL encode special characters with this tool.
https://example.com/search?q=hello world&lang=en https://example.com/search?q=hello%20world&lang=en name=JΓΌrgen&city=SΓ£o Paulo name%3DJ%C3%BCrgen%26city%3DS%C3%A3o%20Paulo %E4%B8%AD%E6%96%87 δΈζ URL encoding cheat sheet β reserved characters
These are the characters that must be URL-encoded when used in query parameter values. Understanding which characters must be percent-encoded helps you encode & in a URL, encode a space in a URL, and avoid common mistakes like %2520.
| Character | Encoded | Description |
|---|---|---|
| (space) | %20 | Space β the most common encoded character. %20 represents a space in a URL. |
& | %26 | Ampersand β separates query parameters; must be encoded inside values. |
= | %3D | Equals β separates keys from values in a query string. |
? | %3F | Question mark β starts the query string portion of a URL. |
/ | %2F | Forward slash β path separator. %2F represents a literal slash inside a value. |
# | %23 | Hash β starts the fragment identifier portion of a URL. |
+ | %2B | Plus sign β sometimes confused with a space in form encoding. |
: | %3A | Colon β used in the protocol (http:) and port portions of a URL. |
Common use cases
Building tracking URLs
Encode non-ASCII campaign names, UTM parameters, and referral tokens so they don't break in email clients or ad platforms.
Debugging API requests
Decode percent-encoded query strings from server logs and HTTP traces to see exactly what clients sent.
Decoding log lines
Paste multiple encoded URLs from access logs. Batch mode decodes every line independently so you can triage fast.
Encoding non-ASCII text
Safely encode Unicode characters (CJK, accented letters, emoji) into percent-encoded UTF-8 byte sequences for use in URLs.
Privacy & trust
All conversion runs in your browser using the standard JavaScript encodeURIComponent and decodeURIComponent APIs. Your input is never sent to a server, logged, or stored. No analytics event captures input contents β only anonymous interaction counts. This URL encoder is safe for URLs containing tokens, secrets, or internal hostnames.
What is URL encoding (percent encoding)?
URL encoding, also called percent encoding, replaces characters that are not allowed or have special meaning in a URL with a % followed by two hexadecimal digits representing the byte value in UTF-8. A space becomes %20, an ampersand becomes %26. It is defined in RFC 3986 and is essential for valid URLs, API requests, and query strings. This URL encoder online uses the standard JavaScript encodeURIComponent and encodeURI APIs for correctness.
When should I encode the whole URL vs. just one parameter?
If you have a complete URL like https://example.com/path?key=value and want to escape only unsafe characters while preserving structure (://, /, ?, &), use Full URL mode (encodeURI). If you are encoding a single value that will sit inside a query parameter, use Component mode (encodeURIComponent) so reserved characters like & and = inside the value do not break the query string.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a complete URI but preserves URL-structural characters: :, /, ?, #, &, =. Use it when you have a full URL and only want to escape characters not legal anywhere in a URI. encodeURIComponent encodes a single URI component and escapes all reserved characters, including /, ?, &, and =. The Component / Full URL toggle in this tool maps directly to those two functions, so you can use it as an encodeURIComponent online or decodeURIComponent online tool.
Why does %2520 appear in my URL?
%2520 is a double-encoded space. A space is first encoded to %20; if that result is encoded a second time the % is escaped to %25, producing %2520. This usually means a URL is being encoded twice. The tool detects this and shows an "Input looks already URL-encoded" hint so you can switch to decode and avoid double-encoding.
Which characters must be URL-encoded?
In a URI component (a query parameter value), every character outside the unreserved set must be percent-encoded. The unreserved set is AβZ, aβz, 0β9, -, _, ., and ~. Everything else β spaces, punctuation, and non-ASCII characters β must be encoded. In a full URI, structural characters like :, /, ?, #, &, and = are left unencoded so the URL stays valid. The cheat sheet above lists the most common encoded characters.
How do I encode a space, &, or + in a URL?
A space encodes to %20, an ampersand & encodes to %26, and a plus sign + encodes to %2B. Paste the text into this tool in Component mode and click Encode β encodeURIComponent escapes all three. Use Full URL mode if you only need to escape spaces and non-ASCII characters while preserving the URL structure.
Is it safe to paste a URL with secrets into this tool?
Yes. All conversion runs entirely in your browser using the standard JavaScript encodeURIComponent / decodeURIComponent APIs. Your input is never sent to a server, logged, or stored. You can verify this in your browser's Developer Tools Network tab β no requests carry your input data. It is safe to paste URLs containing API tokens, session IDs, or internal hostnames.
Can I decode a URL that contains non-ASCII characters?
Yes. This URL decoder handles UTF-8 encoded byte sequences. For example, %E4%B8%AD%E6%96%87 decodes to the Chinese characters δΈζ. Emoji, accented characters (such as %C3%BC β ΓΌ), and any other Unicode text is fully supported. If a decode fails, the tool shows the exact position and offending sequence so you can pinpoint the malformed escape.