# Protobuf Decoder 无定义 Protobuf 网页解码器

> Pawit Pornkitprasan 开发的 React 网页应用，用于在没有原始 .proto 文件的情况下解码 Protocol Buffers 数据；既有在线托管页面，也可在本地运行，所有解码都在浏览器中完成。粘贴的十六进制或 base64 数据（也可上传文件）会被拆分成表格，列出字节范围、字段编号、线路类型和内容：varint 同时显示为无符号整数、补码整数和 zigzag 编码整数，fixed32 和 fixed64 显示为整数和浮点数，长度分隔字段若能完整解析则显示为嵌套报文，否则显示为 UTF-8 字符串或字节。它会跳过开头的 gRPC 报文头，还可选择按 varint 长度前缀拆分连续的多条报文。

- 类型：工具
- 目标：协议
- 类别：协议分析工具
- 关联：基础工具
- 来源复核于：2026-10-27
- 收录于：2026-11-03
- 原始资源：<https://github.com/pawitp/protobuf-decoder>
- 一手来源：<https://github.com/pawitp/protobuf-decoder/blob/7d0b5edecbbbd38c1230ba9301359cc27e373c23/README.md>
- 目录页面：<https://awesomerea.org/zh/resources/pawitp-protobuf-decoder/>
- 记录 JSON：<https://awesomerea.org/resources/pawitp-protobuf-decoder/record.json>
- 英文版：[English](https://awesomerea.org/resources/pawitp-protobuf-decoder/index.md)

## 使用条件与局限

- 没有发行版或标签；package.json 声明的是私有的 0.1.0 软件包。所审阅的 2026-10-17 master 提交是 Dependabot 依赖升级，最近的功能性改动是 2024 年加入的文件上传和 2025 年加入的 varint 长度前缀输入。CircleCI 在 Node 20.11 上运行 Vitest 单元测试，并将覆盖率上传到 Codecov。
- 托管在 protobuf-decoder.netlify.app 的页面只需浏览器即可使用，应用说明所有解码都在本地通过 JavaScript 完成。在本地运行需要 Node.js 和 npm：先运行 npm install，再用 npm start 启动 Vite 开发服务器，或用 npm run build 生成静态构建。
- 解码不依赖定义文件，属于启发式推断：无法恢复字段名称和声明类型；每个长度分隔字段都要猜测是嵌套报文、字符串还是字节；源码将重复字段支持标为待办；也不处理 group 线路类型，遇到时解码会停止，剩余输入显示为未解析字节。它只负责解码，不能编辑、重新编码，也没有代理集成；待分析的报文需由用户自行获取。
- 采用 MIT 许可（Copyright 2019 Pawit Pornkitprasan）。

## 一手来源

1. <https://github.com/pawitp/protobuf-decoder/blob/7d0b5edecbbbd38c1230ba9301359cc27e373c23/README.md>
2. <https://github.com/pawitp/protobuf-decoder/blob/7d0b5edecbbbd38c1230ba9301359cc27e373c23/src/App.jsx>
3. <https://github.com/pawitp/protobuf-decoder/blob/7d0b5edecbbbd38c1230ba9301359cc27e373c23/src/protobufDecoder.js>
4. <https://github.com/pawitp/protobuf-decoder/blob/7d0b5edecbbbd38c1230ba9301359cc27e373c23/src/protobufPartDecoder.jsx>
5. <https://github.com/pawitp/protobuf-decoder/blob/7d0b5edecbbbd38c1230ba9301359cc27e373c23/src/ProtobufPart.jsx>
6. <https://github.com/pawitp/protobuf-decoder/blob/7d0b5edecbbbd38c1230ba9301359cc27e373c23/package.json>
7. <https://github.com/pawitp/protobuf-decoder/blob/7d0b5edecbbbd38c1230ba9301359cc27e373c23/.circleci/config.yml>
8. <https://github.com/pawitp/protobuf-decoder/blob/7d0b5edecbbbd38c1230ba9301359cc27e373c23/LICENSE>
9. <https://protobuf-decoder.netlify.app/>

## 同分区更多条目：协议

- [gr-lora LoRa 物理层解码模块](https://awesomerea.org/zh/resources/gr-lora/index.md) · 工具
- [termshark tshark 终端界面](https://awesomerea.org/zh/resources/termshark/index.md) · 工具
- [SigDigger 数字信号分析器](https://awesomerea.org/zh/resources/sigdigger/index.md) · 工具
- [grpc-tools gRPC 流量调试工具集](https://awesomerea.org/zh/resources/grpc-tools/index.md) · 工具
- [Holley EFI Parser 日志与 CAN 协议解析工具](https://awesomerea.org/zh/resources/holley-efi-parser/index.md) · 工具
- [CAN Bus Parser VanMoof 总线解析工具](https://awesomerea.org/zh/resources/vanmoof-can-bus-parser/index.md) · 工具

## 关于此条目

说明已依据一手来源复核。
原创说明采用 MIT 许可；外部项目、论文与素材保留各自的权利和许可。
