How to use this tool
- 1 Open URL Encoder & Decoder, then enter, paste, or choose the content you want to process.
- 2 Adjust the available options and output format for your task.
- 3 Review the instant result, then copy or download the available output.
Percent-encode or decode URLs and query parameters with encodeURI or encodeURIComponent.
Keeps : / ? & = # intact — for a whole link
| Protocol | https: |
|---|---|
| Host | example.com |
| Path | /搜尋 |
| Query | q → 網址 編碼 |
| Query | lang → zh-TW |
| Hash (#) | — |
Percent-encode or decode URLs and query parameters with encodeURI or encodeURIComponent. Use it for everyday work, development, learning, or quick verification.
This tool runs in your browser. Before working with sensitive data, make sure you trust your browser and device environment.
Under RFC 3986, URIs can only contain a restricted set of ASCII characters directly. Non-ASCII characters (such as CJK characters or emoji), spaces, and reserved symbols must be converted into UTF-8 bytes and represented as % followed by two hexadecimal digits (percent-encoding). For example, the character "你" is three UTF-8 bytes and encodes to %E4%BD%A0.
Two encoding scopes serve different tasks: "Full URL (encodeURI)" preserves URI structure delimiters such as :, /, ?, #, &, and =, making it suitable for encoding an entire web address. "URL Component (encodeURIComponent)" escapes those delimiters as well, which is required when embedding a single query value or path segment.
In HTML form submissions (application/x-www-form-urlencoded), spaces are encoded as + instead of %20. Enabling "Treat + as space" in Decode mode converts literal + characters to spaces before percent-decoding while keeping %2B as a literal +.
Use encodeURI when you have a complete URL starting with https:// and want to keep :, /, ?, &, and = intact. Use encodeURIComponent when encoding an individual query parameter value (such as a search term or a callback URL passed inside ?redirect=...).
Every % in an encoded string must be followed by two valid hexadecimal digits (0-9, A-F), and multi-byte sequences must form valid UTF-8 code points. A bare % sign or a truncated multi-byte sequence (such as %E4%BD) will fail decoding and report the approximate character position.
RFC 3986 defines %20 as the standard percent-encoding for a space, whereas application/x-www-form-urlencoded form query strings represent spaces with +. Turn on "Treat + as space" when decoding form-encoded query strings.
Yes. Decode mode always performs a full decode (equivalent to decodeURIComponent), so %3A, %2F, %3F, %26 and %3D become :, /, ?, & and = again. For example, https%3A%2F%2Falpakit.dev%2Fa%3Fx%3D%E5%BF%AB decodes to https://alpakit.dev/a?x=快. Only encoding needs the Full URL or URL Component choice; decoding has no scope option.
Browse this category: Dev Tools
Encode and decode Base64/URL instantly with MD5 & SHA-256 hash generation.
Encode/decode HTML entities and copy special characters or emojis from a searchable grid panel.
Beautify, minify, validate and debug JSON syntax errors.
Convert cURL commands to JavaScript Fetch, Axios, Python, and Go code instantly for rapid development.