ToolKitToolKit工具箱

% URL Encode / Decode

encodeURIComponent / decode both ways

🔒 Everything runs locally in your browser. Your data is never uploaded to any server.

About this tool

URL encoding (also called percent-encoding) turns characters that cannot appear directly in a URL — spaces, non-ASCII text, and reserved symbols like & ? # = — into %XX escape sequences, so the link is parsed correctly as it travels between browser and server. This tool is built on the browser-native encodeURIComponent / decodeURIComponent, so it round-trips Unicode and special characters reliably.

It is especially useful for building query parameters, handling form submissions, and debugging links that contain non-ASCII text: once encoded, a link can safely carry any content, and once decoded it returns to readable plain text.

How to use

  1. Paste the string into the input box: plain text to encode, or a string containing %XX to decode.
  2. Choose "Encode" or "Decode". Encoding follows encodeURIComponent semantics and escapes reserved characters.
  3. The result appears instantly, ready to splice into a URL or restore from one.
  4. Click "Copy" to take the result. Garbled output after decoding usually means the original was not UTF-8 encoded.

When to use it

  • Splice a keyword with non-ASCII text or spaces into a query parameter ?q=...
  • Decode a long run of escapes like %E4%B8%AD from a log or the address bar.
  • Escape nested URL parameters such as redirect or callback when building share links.
  • Diagnose an endpoint that errors or loses characters because a parameter was not encoded.
  • Safely place a string with special symbols into a URL path or fragment.

FAQ

What is the difference between encodeURIComponent and encodeURI?

encodeURIComponent escapes reserved characters like & ? = /, which suits a single parameter value; encodeURI leaves them intact for encoding a whole URL. This tool uses the former, so it is best for parameter fragments.

Why is the decoded output garbled?

Usually the original was not percent-encoded as UTF-8, or the string is truncated or contains an invalid % sequence. Confirm the source encoding and retry.

Is a space encoded as %20 or + ?

Following encodeURIComponent, this tool encodes a space as %20. The + form is specific to application/x-www-form-urlencoded form bodies, which is a different use case.

Is the content uploaded?

No. Encoding and decoding run entirely in your browser; nothing is sent to any server.