URL 编解码

对字符串进行 URL 编码或解码,支持 encodeURIComponent / decodeURIComponent / encodeURI

输入
输出

模式说明

  • encodeURIComponent — 编码所有非字母数字字符(含 / ? # : @),适合编码 URL 参数值
  • decodeURIComponent — 解码 %XX 格式的字符串
  • encodeURI — 保留 URL 结构字符(:// / ? & =),仅编码特殊字符,适合整段 URL 编码