URL Encoder & Decoder
Encode and decode URLs instantly in your browser
About URL Encoding
URL encoding converts characters into a format that can be safely transmitted in a URL. Uses native encodeURIComponent() / decodeURIComponent() — no data leaves your browser.
How to Use This Tool
- Choose the mode: "Encode" to percent-encode special characters, or "Decode" to convert an encoded URL back to plain text.
- Paste or type your URL or query string into the input field.
- The encoded or decoded output appears instantly.
- Click "Copy" to copy the result to your clipboard.
Common Use Cases
- Encoding query string parameter values that contain spaces, ampersands, or special characters.
- Decoding a percent-encoded URL received in a log file or from a webhook to read its contents.
- Preparing URL parameters when building REST API requests manually.
- Encoding file paths that contain spaces or Unicode characters for use in a browser address bar.
- Debugging URL routing issues by checking exactly how a URL string is encoded before it is sent.
Frequently Asked Questions
What is URL encoding (percent encoding)?
URL encoding replaces unsafe ASCII characters with a "%" followed by two hexadecimal digits representing the character's UTF-8 byte value. For example, a space becomes %20 and an ampersand becomes %26.
What characters need to be encoded in a URL?
Characters that must be encoded include spaces, angle brackets (< >), curly braces ({ }), pipes (|), backslashes (\), carets (^), square brackets ([ ]), backticks (`), and all non-ASCII Unicode characters.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL, preserving characters like /, ?, #, and & that have structural meaning. encodeURIComponent is stricter and encodes those structural characters too — use it for individual query parameter values.
Why does %20 sometimes appear as "+" in URLs?
The "+" character is an alternative encoding for a space in the application/x-www-form-urlencoded format used by HTML forms. Percent encoding uses %20. Both represent a space but in different contexts.