开发工具

URL 编解码

URL 编码与解码(rawurlencode / urlencode)

GET

tool-urlcodec

公开接口 累计 1 次
/api/v1/tool-urlcodec

说明

action=encode 使用 rawurlencode(RFC 3986),decode 使用 rawurldecode;encode_plus / decode_plus 使用传统 urlencode(空格转 +)。

参数

2 个
参数类型必填默认值说明
text string 必填 - 待处理文本
action string 可选 encode 编码或解码方式

响应示例

{
    "ok": true,
    "data": {
        "result": {
            "action": "encode",
            "result": "hello%20world",
            "length": 11
        }
    }
}

命令行调用

curl -X GET '/api/v1/tool-urlcodec?action=encode'