URL 解析

URL

组成部分 · 可直接修改

protocol协议
username用户名
password密码
hostname主机
port端口
pathname路径
hash锚点
search查询串
origin源

查询参数

空格编码为

参数值按解码后的原文编辑,重建时自动编码。

重建后的 URL


新窗口打开

批量编码 / 解码 · 每行一条

Component 对应 encodeURIComponent(用于单个参数值,会编码 / ? & =);整条 URI 对应 encodeURI(保留 URL 结构字符);表单格式把空格编成 +。