URL Encoder & Decoder
Encode or decode URI components for safe use in web addresses, query parameters, and API requests.
How to use this tool
- Select Encode or Decode mode.
- Enter the text or URL-encoded string in the input area.
- Click Convert to see the result.
This tool uses encodeURIComponent() for encoding and decodeURIComponent() for decoding. These functions encode/decode individual URI components (such as query parameter values), not entire URLs.
RFC 3986 Percent-Encoding and URI Reserved Characters
Uniform Resource Identifiers (URIs) divide characters into unreserved (safe as-is) and reserved (characters that define syntax delimiters):
| Character | Percent-Encoded Value | Reserved Role in URIs |
|---|---|---|
| Space ( ) | %20 (or + in forms) |
Disallowed in raw URIs |
Question Mark (?) |
%3F |
Separates query string from path |
Ampersand (&) |
%26 |
Separates multiple query parameters |
Equals (=) |
%3D |
Assigns parameter values (key=val) |
Slash (/) |
%2F |
Separates hierarchical path segments |
API and Webhook Safety
When sending data in URL query strings (such as callback URLs or search queries), failure to encode values properly causes broken links and parameter injection vulnerabilities. Encoding query values guarantees reliable REST API interactions.
RFC 3986 Percent-Encoding and URI Reserved Characters
Uniform Resource Identifiers (URIs) divide characters into unreserved (safe as-is) and reserved (characters that define syntax delimiters):
| Character | Percent-Encoded Value | Reserved Role in URIs |
|---|---|---|
| Space ( ) | %20 (or + in forms) |
Disallowed in raw URIs |
Question Mark (?) |
%3F |
Separates query string from path |
Ampersand (&) |
%26 |
Separates multiple query parameters |
Equals (=) |
%3D |
Assigns parameter values (key=val) |
Slash (/) |
%2F |
Separates hierarchical path segments |
API and Webhook Safety
When sending data in URL query strings (such as callback URLs or search queries), failure to encode values properly causes broken links and parameter injection vulnerabilities. Encoding query values guarantees reliable REST API interactions.
URL encoding vs. full URL encoding
encodeURIComponent() encodes a component of a URI — such as a query parameter value. It encodes characters like =, &, ?, /, and # that have special meaning in URLs.
encodeURI() encodes a full URI and preserves characters like /, :, ?, #, and & that are part of the URL structure. This tool uses encodeURIComponent() because encoding individual components is the most common use case.
Frequently asked questions
URLs may only contain a limited set of ASCII characters. Characters outside this set (such as spaces, ampersands, slashes, question marks, and non-ASCII Unicode) have reserved structural meanings in URI syntax and must be replaced with percent signs followed by their hexadecimal ASCII code (e.g., `%20` for space).
`encodeURI` is intended for complete URLs and preserves reserved protocol separators like `http://`, `:`, `/`, `?`, and `#`. `encodeURIComponent` is intended for query string values and safely encodes all reserved characters including `&`, `=`, `+`, and `/`.
In standard RFC 3986 URI encoding, a space is represented as `%20`. In HTML form submissions (`application/x-www-form-urlencoded`), spaces are historically encoded as `+`. This tool supports standard RFC 3986 percent-encoding.
Yes. Pasting full URLs with complex query strings, tracking parameters, and nested sub-URLs decodes them into plain, readable text instantly.
No. All parsing and percent-encoding executes directly in your browser's local thread without server interaction.