URL 编解码工具

在线 URL encode / decode,一键转义 URL 参数。浏览器端处理。

广告位 — Google AdSense

URL Encoder/Decoder — Percent-encoding Made Easy

工具介绍

URLs may only contain ASCII characters. Chinese, spaces, &, = and other special characters must be percent-encoded (%xx) to travel safely. This tool implements JavaScript's encodeURIComponent and decodeURIComponent, supports pasting entire URLs to auto-extract query parameters, and batch-encodes individual values.

怎么使用

  1. Pick a mode: full URL encode, single param, or decode
  2. Paste your URL or parameter value
  3. Result appears instantly; copy to clipboard with one click

常见用例

常见问题

Q: encodeURIComponent vs encodeURI?
A: The former encodes almost everything (use for VALUES). The latter keeps URL syntax characters :/@?&=# (use for FULL URLs).

Q: Garbled after decode?
A: Likely a charset mismatch (GBK vs UTF-8). This tool assumes UTF-8.

Q: Space → %20 or +?
A: %20 in paths, both work in query strings. We default to %20.

小贴士

Debugging a REST API? Paste the server-reported URL here to see exact params.

In JS fetch, prefer URLSearchParams — it handles encoding automatically.

Need Base64 URL-safe variant (+/ → -_)? Use the Base64 tool.