URL Encoder/Decoder: Percent Encoding & Decoding Online
URL encoder and decoder online: percent-encode and decode text with UTF-8 support, including full URL and query string modes.
Updated 2026-08-26
Related Tools
Base64 Encoder/Decoder: Encode & Decode Text Online
HTML Entity Encoder: Escape Special Characters Online
JWT Decoder Online: Decode & Debug JSON Web Tokens
ASCII Converter: Encode, Decode & View ASCII Table
Text to Binary Converter: Encode & Decode Binary Online
Charset Detector: Detect File Encoding & Fix Garbled Text
Features
- Encode or decode text for safe use in URLs
- Supports UTF-8 including emoji, Chinese, and other Unicode
- Space encoding options: %20 or + for form data
- Instant results as you type
- Encode query string parameters individually or the entire URL at once
- Decode percent-encoded strings back to their original readable text
- Bidirectional conversion: switch between encode and decode with a single toggle
- Options to control hex casing (uppercase %20 vs lowercase %20) for different API requirements
- Real-time character and byte length counters in the status bar
- Works offline after first load
How to Use
- 1Paste your text or URL into the input area.
- 2Toggle between Encode and Decode. Enable Spaces as "+" for form data.
- 3Results update instantly. Use Copy or Download to save.
- 4Encode a full URL by pasting it directly; the tool preserves the URL structure while encoding unsafe characters.
- 5Need to decode a query string? Paste the encoded parameter values and switch to Decode mode to see the original text.
- 6Enable Uppercase Hex when integrating with systems that expect uppercase percent-encoding (e.g., RFC 3986 compliant APIs).
- 7Use Spaces as + for HTML form submissions; this matches the application/x-www-form-urlencoded content type.
- 8Test API endpoints by encoding special characters in query parameters and inspecting the encoded output.
- 9Drag and drop a .txt file to batch-encode or decode multiple URLs or strings at once.
- 10Use the character counter to ensure your encoded URL stays within length limits for different browsers and CDNs.
Frequently Asked Questions
Why do spaces turn into %20 in my URL?
Because spaces (and other unsafe characters like &, ?, and non-ASCII text) are not allowed in URLs; they are replaced with % followed by two hex digits, so a space becomes %20. This is called URL encoding (percent-encoding), and it lets any text travel safely inside a URL or query string. The tool shows you the encoded form of every character instantly.
What does Spaces as "+" do?
When enabled, spaces are encoded as + instead of %20. This is the application/x-www-form-urlencoded format used in HTML forms. Use this for form submissions.
What is the difference between URL encoding and Base64 encoding?
URL (percent) encoding escapes individual unsafe characters as %XX and keeps the rest of the text readable; it is for URLs and query strings. Base64 maps arbitrary bytes onto a fixed alphabet (A–Z, a–z, 0–9, +, /, = padding) and is meant for embedding binary data (images, tokens) in text channels. They are not interchangeable: if your text has to survive inside a URL, percent-encode it; if you are transporting binary, Base64.
Why does my decoded text show garbled characters?
The string was percent-encoded from a character set other than UTF-8 (common with older systems using GBK/GB2312). This tool decodes as UTF-8, so bytes from other encodings render as mojibake. Fix it at the source: decode with the charset the string was encoded from, or re-encode the original text in UTF-8 and use that.
Does it support Unicode?
Yes. The tool handles all Unicode characters including emoji, Chinese, Japanese, accented letters, and any UTF-8 text.
What characters need to be URL-encoded?
Characters that must be encoded include: spaces (%20), special characters like &, ?, #, %, /, :, ;, =, @, $, commas, and all non-ASCII characters. Only letters A-Z, digits 0-9, and a few special characters (-, _, ., ~) are safe without encoding.
What's the difference between encoding a URL vs encoding query parameters?
When encoding a full URL, the :// and / path separators should remain readable. When encoding query parameters, encode the key and value separately. This tool handles both scenarios: paste a full URL or just the parameter values.
Should I use %20 or + for spaces?
Use %20 in URL path segments and query strings for standard URL encoding. Use + for spaces in application/x-www-form-urlencoded form data (like HTML form submissions). Our Spaces as + option lets you choose the right format.
Why do some encoded URLs have uppercase hex (%20) and others lowercase (%20)?
Both uppercase and lowercase hex digits are valid in URL encoding. RFC 3986 treats them as equivalent. Uppercase is more common in practice and preferred for readability. The tool lets you choose either format via the Uppercase Hex option.
How does URL encoding work for Chinese characters?
Chinese characters are encoded as UTF-8 bytes first, then each byte is percent-encoded. For example, '中' (U+4E2D) becomes %E4%B8%AD in UTF-8. The tool handles this automatically; just type the Chinese text and it will encode correctly.
Can I encode multiple parameters at once?
Yes. Paste your entire query string (e.g., 'name=value&foo=bar') and the tool will encode the parameter values while preserving the & and = separators. This is especially useful for preparing API request payloads.
What is double URL encoding and when would I need it?
Double encoding means encoding an already-encoded value (e.g., %20 becomes %2520). This is sometimes required when passing URLs as query parameters, or when a system decodes input before re-encoding it. Use Encode mode twice for double encoding.
Why can't my URL encoder/decoder handle emojis correctly?
Emoji are outside the BMP and encode to four UTF-8 bytes, so a correct encoder produces a 12-hex-digit sequence like %F0%9F%98%80. Tools that internally use UTF-16 or treat text as Latin-1 produce broken output (%3F or half sequences). This tool encodes with UTF-8, so paste the emoji directly; if a form or API rejects it, check that every layer of your stack (database column charset, HTTP header) is UTF-8.
Why does my url encoder decoder online give a different result than Postman or another tool?
Almost always an encodeURI vs encodeURIComponent difference: encodeURI leaves reserved characters like /, :, ?, &, = readable, while encodeURIComponent percent-encodes them, and Postman applies its own per-field rules on top. The other classic difference is double encoding: pasting an already-encoded string in again turns %20 into %2520. Decide which layer you are encoding for (path vs query value) and use the matching mode consistently.