What is the URL Encode & Decode?
The URL Encode & Decode utility is an RFC 3986 percent-encoding translator and interactive URL query parameter inspector built for web developers, SEO engineers, and digital marketers. Uniform Resource Identifiers (URIs) can only be transmitted over the Internet using a restricted subset of the US-ASCII character set. Whenever a URL or query parameter contains spaces, non-ASCII UTF-8 characters, or reserved structural delimiters (`?`, `&`, `=`, `#`, `/`, `+`), those characters must be converted into `%XX` hexadecimal byte triplets.
One of the most frequent sources of subtle bugs in JavaScript web development is choosing between `encodeURIComponent()` and `encodeURI()`. Our tool lets you switch between both modes visually: Component Mode (`encodeURIComponent`) encodes every reserved delimiter (`: / ? # & = +`) so a full URL or arbitrary string can be safely passed inside a query parameter value, whereas Full URI Mode (`encodeURI`) preserves structural URL delimiters so a complete link remains clickable while escaping spaces and Unicode characters.
As a powerhouse bonus feature, this tool includes a Live URL & Query Parameter Parser Table. Paste any complex tracking URL, OAuth redirect link, or API endpoint to see it automatically decomposed into Protocol, Hostname, Port, Pathname, Hash Fragment, and an editable Key-Value Query Parameter table where you can modify, add, or delete query parameters and copy the rebuilt URL immediately.
How to Use URL Encode & Decode (Step-by-Step)
- 1
Choose Component Mode vs. Full URI Mode
Select 'encodeURIComponent' when encoding query parameter values (encodes /, ?, &, =), or select 'encodeURI' when encoding a complete web address.
- 2
Enter Text or URL to Encode or Decode
Type or paste your unencoded string in the left box or your percent-encoded (`%20`, `%3A%2F%2F`) string in the right box for live bidirectional conversion.
- 3
Toggle '+' as Space Handling
Enable 'Treat + as Space (application/x-www-form-urlencoded)' when decoding HTML form submissions or legacy query strings where spaces are represented as `+`.
- 4
Inspect the URL & Query Parameter Parser Table
Paste any full URL to view its protocol, domain, path, hash, and a decoded key-value table of every `?key=value` query parameter.
- 5
Edit Query Params Live & Copy Rebuilt URL
Modify parameter keys or values directly inside the table (or add/remove rows) and click 'Copy Rebuilt URL' to grab the cleanly re-encoded link.
Key Features of Our URL Encode & Decode
encodeURIComponent vs. encodeURI Mode Toggle
Clearly separates query-value encoding (escapes `: / ? & =`) from full-address encoding (preserves URL structure).
Interactive URL & Query String Decomposer
Splits any URL into Protocol, Host, Path, Hash, and an editable table of decoded query parameters (`?a=1&b=2`).
Live Two-Way Query Parameter Builder
Edit, add, or delete query parameters in the table and watch the properly percent-encoded URL update in real time.
Form-Urlencoded (+) Space Toggle
Handles both RFC 3986 `%20` spaces and HTML form `application/x-www-form-urlencoded` `+` spaces accurately.
RFC 3986 Strict Punctuation Escaping
Optionally escapes `! ' ( ) *` characters required by strict OAuth 1.0a and AWS Signature v4 canonicalization.
Multi-Byte UTF-8 Percent Encoding
Properly expands accented letters, non-Latin scripts, and emojis into their multi-byte `%XX` UTF-8 sequences.
Key Benefits & Advantages
Debug Complex OAuth & Tracking Redirects
Unpack nested `redirect_uri=https%3A%2F%2F...` and UTM marketing links into a clean, readable table instead of squinting at `%26` and `%3D`.
Prevent Broken Query Strings in API Calls
Ensure values containing `&`, `+`, or `#` are properly escaped with `encodeURIComponent` so they don't truncate your HTTP GET requests.
Edit UTM & Analytics Parameters Without Typos
Tweak `utm_source`, `utm_medium`, `utm_campaign`, or pagination params in the visual table and copy a guaranteed-valid URL.
100% Local Privacy for Sensitive Tokens
Inspect OAuth `code=`, `state=`, and presigned AWS S3 URLs locally without exposing signed links to external servers.
Common Real-World Use Cases
OAuth 2.0 & SAML Redirect Debugging
Decode callback URLs and inspect `client_id`, `redirect_uri`, `scope`, and `state` parameters cleanly.
REST API Query Parameter Construction
Safely encode filter expressions, search queries, and ISO timestamps containing `+` timezone offsets.
SEO & Digital Marketing UTM Auditing
Inspect, clean, or modify `utm_*`, `gclid`, and `fbclid` parameters on campaign landing page URLs.
Internationalized URL (IRI) Inspection
Convert non-ASCII path segments (Arabic, Hindi, Japanese, Cyrillic) between percent-encoded ASCII and readable Unicode.
How URL Encode & Decode Works Technically
Under RFC 3986, URI characters are divided into Unreserved characters (`A–Z`, `a–z`, `0–9`, `-`, `.`, `_`, `~`) and Reserved delimiters (`:`, `/`, `?`, `#`, `[`, `]`, `@`, `!`, `$`, `&`, `'`, `(`, `)`, `*`, `+`, `,`, `;`, `=`). When percent-encoding an arbitrary character, the character is first encoded into its UTF-8 byte sequence (`Uint8Array`), and each non-unreserved byte $b$ is replaced by `%` followed by its uppercase two-digit hexadecimal representation (`b.toString(16).toUpperCase().padStart(2, '0')`). For example, a space (`0x20`) becomes `%20`, while the Euro symbol `€` (3 bytes in UTF-8: `0xE2 0x82 0xAC`) becomes `%E2%82%AC`.
The difference between ECMAScript's `encodeURI` and `encodeURIComponent` lies solely in their safe-character sets: `encodeURI` leaves the 11 URI structural separators (`; , / ? : @ & = + $ #`) unescaped so a full URL remains intact, whereas `encodeURIComponent` escapes all 11 of those characters so the resulting string can be safely embedded as a single query key or value without corrupting the outer URI's syntax tree.
Expert Tips for Best Results
- Use `encodeURIComponent` whenever you are encoding a single query parameter value (like `?redirect=` or `?q=`), and use `encodeURI` only when encoding an entire URL string.
- Watch out for the plus sign (`+`) in timestamps like `2026-10-16T12:00:00+05:30`! If you don't encode `+` as `%2B`, backend servers will decode it as a space character.
- In the Query Parameter Parser table below, you can add new rows or delete existing tracking parameters (like `fbclid`) to clean up messy links.
- A hash sign (`#`) inside a query value will truncate everything after it into a browser URL fragment unless it is percent-encoded as `%23`.
- Native `encodeURIComponent` leaves `! ' ( ) *` unencoded; toggle 'Strict RFC 3986' if you are computing AWS SigV4 or OAuth 1.0 signatures.
100% Local Browser Privacy Guarantee
All URL encoding, decoding, and query parameter parsing happen 100% locally in your browser. Presigned URLs, OAuth redirect links, and API tokens never leave your device.
Frequently Asked Questions About URL Encode & Decode
What is the difference between encodeURI and encodeURIComponent?+
`encodeURI()` is meant for a full URL—it encodes spaces (`%20`) and special characters but leaves `/`, `:`, `?`, `&`, and `=` untouched so the URL still works. `encodeURIComponent()` is meant for an individual query parameter value—it encodes `/`, `:`, `?`, `&`, and `=` into `%2F`, `%3A`, `%3F`, `%26`, and `%3D` so they don't break the surrounding URL.
Why is a space sometimes encoded as %20 and sometimes as +?+
The official URI standard (RFC 3986) encodes spaces as `%20`. However, the older HTML form submission format (`application/x-www-form-urlencoded`) encodes spaces in query strings as `+`. Our tool supports both via the '+' as Space toggle.
What happens if I don't encode an '&' or '#' inside a query parameter?+
An unencoded `&` tricks the server into thinking a brand-new query parameter has started, cutting your value in half. An unencoded `#` causes the browser to treat the rest of the URL as a client-side anchor fragment, which is never even sent to the server in an HTTP request!
How can I view and edit query parameters in a long URL?+
Paste the full URL into the input box and scroll down to the 'URL & Query Parameter Parser' section. It splits the URL into its base components and lists every `?key=value` parameter in an editable table.
Why does '%E2%80%99' appear when I URL-encode an apostrophe?+
Word processors often replace a straight ASCII apostrophe (`'`, 1 byte) with a curly typographic right single quotation mark (`’`, Unicode `U+2019`), which takes 3 bytes in UTF-8 (`E2 80 99`) and therefore encodes to `%E2%80%99`.
What is Strict RFC 3986 mode?+
JavaScript's built-in `encodeURIComponent` does not escape five characters: `!`, `'`, `(`, `)`, and `*`. Strict RFC 3986 mode additionally encodes those five characters to `%21`, `%27`, `%28`, `%29`, and `%2A`, which is required by OAuth and AWS signature specifications.