URL Encoder / Decoder
Encode special characters for URLs or decode percent-encoded strings.
The URL Encoder / Decoder converts text to percent-encoded URL format and back. Encoding replaces special characters — spaces, ampersands, quotes — with their %XX equivalents so they are safe to include in a URL. Decoding reverses the process and restores the original text. Both results appear side by side from a single input, so you can copy whichever version you need.
How to use
- Paste your text or URL into the input field.
- The encoded and decoded versions appear simultaneously in the panels below.
- Copy whichever version you need using the copy button next to each panel.
Encoded output will appear hereDecoded output will appear hereWhen to use
Fixing broken API requests
Query parameters with spaces, ampersands, or equals signs break URLs when sent raw. Encode the parameter value here and use the percent-encoded output in your API call or request builder.
Reading obfuscated redirect URLs
Tracking links and redirect URLs often contain percent-encoded strings. Paste the encoded URL into the decoder to read the original plaintext destination without having to parse it manually.
Building query strings safely
When constructing URLs that include user-supplied data, encode each parameter value separately. This prevents injection and ensures the URL is valid across all browsers and HTTP clients.
Examples
Frequently Asked Questions
What is URL encoding?
URL encoding replaces special characters with percent-encoded equivalents. For example, a space becomes %20 and & becomes %26. This makes strings safe to include in a URL.
When do I need to decode a URL?
When a URL contains percent-encoded characters and you want to read the original text — for example, %E2%80%99 decodes to a right single quote.
What is the difference between encodeURI and encodeURIComponent?
encodeURIComponent encodes everything except letters, digits, and - _ . ! ~ * ' ( ). This tool uses encodeURIComponent, which is correct for encoding individual query parameter values.
Why does a space become %20 and not a + sign?
Both %20 and + represent a space in URLs, but they are used in different contexts. %20 is the standard percent-encoding. + is only valid in query strings (application/x-www-form-urlencoded). This tool uses %20, which is safe everywhere.
Can I encode an entire URL at once?
If you paste a complete URL, the encoder will encode the entire string including the protocol, domain, and path separators. For encoding only a query parameter value, paste just that value.
What is percent encoding?
Percent encoding (also called URL encoding) replaces characters that are unsafe in a URL with a % sign followed by two hexadecimal digits representing the character's byte value. A space (byte 0x20) becomes %20, & becomes %26, and = becomes %3D.
Why does my URL show %20 instead of a space?
URLs cannot contain literal spaces — they break URL parsing. The space was encoded as %20 by your browser, server, or application. Paste the URL into the decoder to see the original human-readable version.
What is the difference between URL encoding and Base64?
URL encoding makes characters safe for use in a URL. Base64 encodes binary data as text for transmission. They serve different purposes — URL encoding for URLs, Base64 for binary-in-text contexts like email attachments and data URIs.
What does %2F mean in a URL?
%2F is the URL-encoded forward slash (/). Since / separates URL path segments, encoding it as %2F lets you include a literal slash inside a path segment or query parameter value without it being interpreted as a path separator.