Free URL Encoder and Decoder Online
This free online URL encoder decoder converts any string to percent-encoded format or decodes any encoded URL back to readable text instantly in your browser. Use it to encode query parameters for API requests, decode OAuth redirect URIs, inspect tracking links, and debug URL encoding issues. No signup, nothing sent to any server, runs entirely client-side.
How to use the URL encoder decoder online
- Select Encode or Decode mode using the toggle at the top of the tool.
- Paste your plain text or percent-encoded string into the input field.
- The result appears instantly in the output panel with no button click required.
- Click Copy to copy the result to your clipboard in one click.
- Click Clear to reset both fields and start with a new input.
URL encode online: building safe query strings and API requests
URL encoding is required whenever you include user-provided text or dynamic values inside a URL. Characters like spaces, ampersands, equals signs, and slashes have structural meaning in URLs. If they appear inside a query parameter value without encoding, the browser or server will misparse the URL. The encode URL operation converts these characters to their percent-encoded equivalents so the URL structure stays intact and the data passes through correctly.
Common use cases for URL encode online: constructing API query strings that include search terms or addresses, building redirect_uri values for OAuth flows, encoding the target URL parameter in tracking links, passing email addresses or phone numbers in query parameters, and encoding filter values that contain special characters. Paste the value you want to include in the URL, encode it here, then concatenate the encoded result into your URL string. For QR codes that point to URLs with query parameters, encode the parameter values here before generating the code in the QR code generator.
URL decode online: reading encoded links and OAuth parameters
Decode URL online converts every %XX percent sequence back to its original character. Encoded URLs appear frequently in email tracking links, OAuth authorization responses, server access logs, copy-pasted browser address bar content, and API error messages that include encoded request paths. In encoded form these strings are difficult to read and debug. Pasting them into the decoder immediately reveals the plain-text content.
A common debugging scenario is inspecting OAuth 2.0 parameters. When an authorization server redirects back to your app, the redirect URL contains a state parameter and sometimes a redirect_uri parameter, both percent-encoded. Decoding them here shows the actual values being passed. JWT tokens embedded in URL parameters are Base64 URL-encoded rather than percent-encoded; use the Base64 decoder for those after stripping the URL encoding layer first.
What is URL encoding and how percent encoding works
URL encoding (percent encoding) is defined by RFC 3986. It converts each unsafe byte to a percent sign followed by two uppercase hexadecimal digits. A space (byte 0x20) becomes %20. An ampersand (byte 0x26) becomes %26. A forward slash (byte 0x2F) becomes %2F. Non-ASCII characters such as accented letters, Arabic, Chinese, and emoji are first converted to UTF-8 bytes, then each byte is percent-encoded. An emoji like a smiley face encodes to four percent sequences because it requires four UTF-8 bytes.
The four unreserved characters that are never encoded are hyphen (-), underscore (_), period (.), and tilde (~), along with all letters and digits. Note that + is not a percent-encoding for space in RFC 3986. It only means space in the older application/x-www-form-urlencoded format used by HTML form submissions. When in doubt, use %20 for spaces to stay compatible with all parsers.
JavaScript URL encode and decode
JavaScript has two pairs of built-in functions for URL encoding. encodeURIComponent(str) encodes a value for use inside a URL component (query parameter, path segment, fragment). It encodes everything except letters, digits, and - _ . ~. decodeURIComponent(str) reverses this. encodeURI(str) encodes a full URL but preserves structural characters like / ? & = : #. decodeURI(str) reverses that.
For constructing query strings in JavaScript, the modern approach is URLSearchParams: new URLSearchParams({ q: "hello world", page: 2 }).toString() returns q=hello+world&page=2 using the form-encoded format (spaces as +). When appending to a URL manually, prefer encodeURIComponent for each value and join with &. This tool applies the same logic as encodeURIComponent for encode mode and decodeURIComponent for decode mode.
Python URL encode and decode
Python's urllib.parse module is the standard library for URL encoding. To encode a single value: from urllib.parse import quote; quote("hello world & more") returns "hello%20world%20%26%20more". The safe parameter controls which characters to leave unencoded: quote(value, safe="") encodes everything except unreserved characters.
To build a full query string from a dictionary in Python: from urllib.parse import urlencode; urlencode({ "q": "search term", "page": 1 }) returns q=search+term&page=1. Python URL decode uses from urllib.parse import unquote; unquote("hello%20world") which returns hello world. The requests library encodes query parameters automatically when you pass a params dict to requests.get(), so manual encoding is only needed when constructing URLs as strings. For API responses that mix JSON and encoded values, the JSON formatter helps inspect the response structure after decoding.
URL encoding in API development and debugging
URL encoding issues are among the most common causes of broken API integrations. A missing or incorrect encoding step causes query parameters to be misread, search terms to be truncated at special characters, redirect URIs to fail OAuth validation, and file path parameters to resolve to wrong resources. The online URL encoder decoder is a quick diagnostic tool: if your API call is misbehaving, paste the problematic parameter value here, encode it, and compare the result to what your code is sending.
When working with HMAC-signed API requests, the string-to-sign must be constructed from the encoded form of each parameter value. Encoding errors in the string-to-sign cause signature mismatches even when the values themselves are correct. For APIs that use SHA-256 HMAC signatures (like AWS Signature V4 or Stripe webhook verification), the SHA hash generator lets you compute and verify hashes alongside the URL encoding step here.
Frequently asked questions
URL encoding (also called percent encoding) converts characters that are not safe to use in a URL into a % symbol followed by two hexadecimal digits representing the character's byte value. For example, a space becomes %20, an ampersand becomes %26, and an equals sign becomes %3D. URL encoding is defined in RFC 3986 and ensures that data passed inside a URL does not break its structure. Without encoding, characters like & and = would be interpreted as URL syntax (query string delimiters) rather than as part of the data.
Paste your string into the input field, make sure the Encode mode is selected, and the percent-encoded result appears instantly. The tool applies component-level encoding using encodeURIComponent rules, which encodes all characters except letters, digits, and the four unreserved symbols: hyphen, underscore, period, and tilde. This is the correct encoding for query parameter values, form data, and any text that will be concatenated into a larger URL string.
Paste the percent-encoded URL or query string into the input field, select the Decode mode, and the decoded plain-text version appears immediately. Every %XX sequence is converted back to its original character. This is useful for reading redirect parameters in email tracking links, decoding OAuth state and redirect_uri values, inspecting encoded query strings from server logs, and making any percent-encoded URL human-readable without manual lookup.
Unreserved characters are never encoded: letters A-Z and a-z, digits 0-9, hyphen (-), underscore (_), period (.), and tilde (~). All other characters get encoded, including: space (%20), ampersand (%26), equals (%3D), plus (%2B), slash (%2F), hash (%23), question mark (%3F), colon (%3A), at sign (%40), brackets (%5B %5D), and all non-ASCII characters including accented letters, Chinese characters, Arabic script, and emoji (encoded as UTF-8 bytes then percent-encoded).
encodeURI() encodes a full URL string but preserves characters that have structural meaning in URLs: forward slash, question mark, ampersand, equals sign, colon, hash, and others. Use it when encoding a complete URL you want to navigate to. encodeURIComponent() encodes all characters except the four unreserved ones (letters, digits, - _ . ~), including the structural URL characters. Use it when encoding individual query parameter values before concatenating them into a URL. This tool applies encodeURIComponent-level encoding.
Both %20 and + represent a space character in URL-encoded strings, but they are used in different contexts. %20 is the standard percent-encoding of a space per RFC 3986 and is correct everywhere in a URL. The + sign represents a space only in application/x-www-form-urlencoded format, which is the encoding used by HTML form submissions. When building URLs manually or through API calls, use %20. When decoding form data submitted by an HTML form, treat + as a space. This tool uses %20 for spaces.
Use encodeURIComponent() to encode individual query parameter values: encodeURIComponent("hello world & more") returns "hello%20world%20%26%20more". To decode: decodeURIComponent("hello%20world") returns "hello world". For encoding a full URL, use encodeURI(). In Node.js, the same browser globals are available. For building query strings from an object, use URLSearchParams: new URLSearchParams({ key: "value with spaces" }).toString() returns "key=value+with+spaces" using the form-encoded format.
Python's urllib.parse module handles URL encoding. To encode a query parameter value: from urllib.parse import quote; quote("hello world & more") returns "hello%20world%20%26%20more". The safe parameter controls which characters are left unencoded: quote(value, safe="") encodes everything except unreserved characters. To encode a full query string from a dictionary: from urllib.parse import urlencode; urlencode({"key": "value with spaces"}) returns "key=value+with+spaces". To decode: from urllib.parse import unquote; unquote("hello%20world") returns "hello world".
Related articles

How to Check Monitor Refresh Rate: Step-by-Step Guide
Learn how to check your monitor refresh rate on Windows and Mac, fix 144Hz running at 60Hz, and verify your actual rate with an online test tool.
8 min read
Fake Data for Testing: A Developer's Guide to Synthetic Data
Learn why developers use fake identity data for testing, what a generator produces, how it differs from anonymized data, and how to use it correctly.
9 min readDead Pixel Test: How to Find and Fix Screen Issues
Learn how to run a dead pixel test, identify dead vs stuck vs hot pixels, fix stuck pixels with our free tool, and know when to file a warranty claim.
9 min read