URL 编解码工具
在线 URL encode / decode,一键转义 URL 参数。浏览器端处理。
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.
怎么使用
- Pick a mode: full URL encode, single param, or decode
- Paste your URL or parameter value
- Result appears instantly; copy to clipboard with one click
常见用例
- Safely transmit Chinese / emoji inside URL params
- Debug API requests — see what the server actually receives
- Encode OAuth redirect_uri parameters correctly
- Convert form data to application/x-www-form-urlencoded
常见问题
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.