URL Encoder / Decoder
Encode and decode URLs using percent-encoding. Choose between component encoding for query values, full URI encoding for complete URLs, or legacy escape encoding. All processing happens locally in your browser.
How to use URL Encoder/Decoder
- 1Paste your URL or text
Type or paste the URL or text string you want to encode into the input field. The output updates in real time.
- 2Choose encode or decode
Toggle between Encode (plain text → percent-encoded) and Decode (percent-encoded → readable text) using the mode selector.
- 3Select the encoding type
Component encoding (encodeURIComponent) encodes all special characters including /, ?, and &. Full URI encoding (encodeURI) preserves URL-structural characters. Choose Component for query parameter values and Full URI for complete URLs.
- 4Use the swap button
Click the swap arrow to move the output back to the input field and flip the mode — useful for round-trip encode/decode testing.
- 5Copy the result
Click the Copy button to copy the encoded or decoded string to your clipboard.
Frequently Asked Questions
What is URL encoding (percent-encoding)?
- URL encoding converts characters that are not allowed in a URL into a '%' followed by two hex digits representing the character's UTF-8 byte values. For example, a space becomes %20, a plus sign becomes %2B, and a slash becomes %2F. This ensures URLs remain valid when they contain special characters.
What is the difference between encodeURI and encodeURIComponent?
- encodeURI is designed for complete URLs — it does NOT encode characters that have special meaning in URLs such as :, /, ?, #, &, =, and @. encodeURIComponent is designed for individual URL components (like query string values) — it DOES encode all those characters. Use encodeURIComponent for query parameter keys and values.
Why does '+' sometimes appear instead of '%20' for spaces?
- The application/x-www-form-urlencoded format (used by HTML forms) encodes spaces as '+'. The RFC 3986 standard percent-encoding uses '%20'. Both are valid in different contexts — '%20' is more universal and works in both URLs and form data.
Is this tool safe for encoding sensitive data?
- URL encoding is not encryption — it is a reversible formatting transformation. Do not use it to protect sensitive information. Anyone who sees the encoded string can decode it trivially. Use HTTPS and proper encryption for sensitive data.
Can I decode a partially encoded URL?
- Yes. Switch to Decode mode and paste the URL. The tool will decode all percent-encoded sequences it finds, leaving any already-decoded characters unchanged.