开发工具

Hex 十六进制编解码

字符串与十六进制互转

GET

tool-hex

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

说明

action=encode 将文本转为 hex;action=decode 将 hex 转回文本,自动忽略空格、冒号、逗号与 0x 前缀。

参数

2 个
参数类型必填默认值说明
text string 必填 - 待处理文本或十六进制字符串
action string 可选 encode encode / decode

响应示例

{
    "ok": true,
    "data": {
        "result": {
            "action": "encode",
            "result": "68656c6c6f",
            "bytes": 5
        }
    }
}

命令行调用

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