URL Encoder/Decoder

Encode CJK and special chars for safe URLs, or decode percent-sequences back to readable text.

Privacy: processed locally, never uploaded.

↓ Paste in the input area below to see results instantly

Scope

Enter a URL or encoded string

UTF-8 and special characters supported. Choose encode or decode.

Output

Encoded result

https%3A%2F%2Ftowalles.com%2Fsearch%3Fq%3D%E4%BD%A0%E5%A5%BD%26lang%3Dzh-CN

Notes

Encoded result

Uses encodeURIComponent,best for query parameter values (encodes ?, &, =, etc.). Full URI: https://towalles.com/search?q=%E4%BD%A0%E5%A5%BD&lang=zh-CN

Encode CJK and special chars for safe URLs, or decode percent-sequences back to readable text.

Quick start

  1. Paste URL or param

    Full URLs or query values both work.

  2. Choose encode mode

    Use component mode for param values; URI mode for full URLs.

  3. Copy result

    Use encoded output in fetch calls or the address bar.

Why URL encoding matters

URLs only safely carry a subset of ASCII. CJK and spaces must become %XX sequences.

Component vs URI encoding

encodeURIComponent encodes ?, &, =; best for a single parameter value.

encodeURI keeps URL structure and encodes only illegal characters.

Typical Workflow

URL encoding is essential when developing web applications that pass parameters. For example, when a user searches for "coffee shop", the browser automatically encodes it as %E5%92%96%E5%95%A1%E5%BA%97 before sending. This tool helps verify encoding results or manually generate test cases for API debugging.

Decoding is equally common. When receiving responses like %7B%22error%22%3A%20404%7D, paste it into the tool to restore readable JSON structures. Bookmark this page for quick troubleshooting of frontend routing issues or backend parameter parsing errors.

Examples

Encode

Input

你好

Output

%E4%BD%A0%E5%A5%BD

Decode

Input

%E4%BD%A0%E5%A5%BD

Output

你好

FAQ

Decode error?

Usually invalid hex after % or a truncated string.

Same as Base64?

No. URL encoding is for addresses and query strings; Base64 is for binary-as-text.

Why do encoded URLs sometimes vary?

Encoding rules differ across languages/libraries. JavaScript encodes spaces as %20 while Python's urllib may use +. This tool follows modern browser standards (%20). Ensure consistent encoding standards between frontend and backend during debugging.