惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
Cisco Blogs
T
The Exploit Database - CXSecurity.com
G
GRAHAM CLULEY
AI
AI
腾讯CDC
月光博客
月光博客
P
Privacy International News Feed
aimingoo的专栏
aimingoo的专栏
博客园 - 聂微东
Latest news
Latest news
宝玉的分享
宝玉的分享
The Last Watchdog
The Last Watchdog
H
Hacker News: Front Page
博客园 - 【当耐特】
H
Hackread – Cybersecurity News, Data Breaches, AI and More
G
Google Developers Blog
D
Docker
D
DataBreaches.Net
O
OpenAI News
IT之家
IT之家
T
Threat Research - Cisco Blogs
S
Securelist
S
Secure Thoughts
V
Visual Studio Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
A
Arctic Wolf
I
Intezer
Simon Willison's Weblog
Simon Willison's Weblog
L
Lohrmann on Cybersecurity
C
Cyber Attacks, Cyber Crime and Cyber Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tor Project blog
Google DeepMind News
Google DeepMind News
J
Java Code Geeks
Help Net Security
Help Net Security
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
N
Netflix TechBlog - Medium
F
Fortinet All Blogs
Attack and Defense Labs
Attack and Defense Labs
D
Darknet – Hacking Tools, Hacker News & Cyber Security
博客园 - Franky
C
Check Point Blog
美团技术团队
Hugging Face - Blog
Hugging Face - Blog
罗磊的独立博客
Forbes - Security
Forbes - Security
F
Full Disclosure
S
Security @ Cisco Blogs
B
Blog RSS Feed

kmcd.dev

Beating Go gRPC-Web Should Have Fixed gRPC Making Dynamic Protobuf Fast in Go Proxy, Record, and Mock gRPC APIs with FauxRPC Introducing ProtoDocs Ghost in the Shell: The Manga Behind the Anime The Hidden Cost of google.protobuf.Value Why Networking Built Its Own Data Modeling Language Zero-Friction Demos with WASM Let's Learn About BGP ConnectRPC: Where is it now? Building APIs with Contracts The Case for Greppable Code Unknown Fields in Protobuf IRC Log: Reactionary Faking protobuf data in Go Y'all are Sleeping on Mise-en-Place IRC Log: Standup 2 HTTP/2 From Scratch: Part 4 IRC Log: rm -rf /var/opt/gitlab/postgresql/data HTTP/2 From Scratch: Part 3 Building a Live BGP Map HTTP/2 From Scratch: Part 2 IRC Log: The Cloud Scale Incident Visualizing the Internet (2026) Shell Log: Namaste HTTP/2 From Scratch: Part 1 IRC Log: Standup HTTP/1.1 From Scratch WHOIS is dead, long live RDAP Months Considered Harmful Encryption vs. Compression On Creating My Own Cover Art Traceroute Tool from Scratch in Go My Favorite Interview Question From JSON to Protobuf Breaking gRPC Morse Code Can You Hack a Phone with Your Voice? Visualizing the Internet (2025) HTTP QUERY and Go I made a daily word game Protovalidate: Can Input Validation Be This Easy? Behold! The Barcode Scanner Mixing CEL and Protobuf for Fun FauxRPC and Protovalidate The Call of the Monolithic Codebase FauxRPC + Test Containers Self-Documenting Connect Services gRPC Over HTTP/3: Followup JSON to Protobuf Conversion gRPC: The Ugly Parts Working with Protobuf in 2024 Introducing FauxRPC HTTP/1.0 From Scratch Y'all are sleeping on HTTP/3 HTTP/0.9 From Scratch What version of HTTP are you using? Texans in Denmark gRPC Over HTTP/3 gRPC: The Good Parts Leaving Texas for Greener Pastures gRPC: The Bad Parts Unit Testing ConnectRPC Servers Daily Prompts Adding chart.js to Hugo Why I'm Rebranding Benchmarking gRPC (golang) Blog Update gRPC From Scratch: Part 3 - Protobuf Encoding Tracking the Wins Visualizing the Internet (2024) Dropping Unknown Fields in ConnectRPC RESTless: Web APIs After REST Introducing unknownconnect-go Making gRPC more approachable with ConnectRPC Inspecting Protobuf Messages Introducing protoc-gen-connect-openapi gRPC From Scratch: Part 2 - Server gRPC From Scratch: Part 1 - Client Why you should use gNMI over SNMP in 2026 The Rollercoaster of Productivity in Side Projects Lessons from a Decades-Long Project How I learned to code Economists with (virtual) Guns Visualizing the Internet (2023) softlayer-python: language bindings/CLI for a cloud company SwFTP: SFTP/FTP Server For Openstack Swift Video: Morning Copenhagen Commute Goodbye Evepraisal Visualizing the spectrum of the sun (Part 2) Visualizing the Internet (2022) Evepraisal: A price estimation tool for Eve Online Visualizing the spectrum of the sun
Exploring Protocol Buffers Interactively
2026-06-25 · via kmcd.dev

Protocol Buffers (protobuf) are a core part of modern RPCs, schema-driven APIs, and microservices. They work well, but learning how the format operates under the hood can be dry. Most of us stick to the high-level basics (like message fields and primitive types) and rarely need to dig into the wire format, varints, ZigZag encoding, or compiler plugins.

I wanted to change that by building a visual, hands-on guide.

Today I am sharing protobuf.kmcd.dev. It is an interactive playground for exploring Protocol Buffers, from schema design and validation to binary wire formats and serialization efficiency.

A diagram showing fixed-size fields being encoded into protobuf

This builds on a previous experiment, bgp.kmcd.dev, which I introduced in Let’s Learn About BGP. That project showed me how much easier it is to understand the inner workings of a protocol when you can see them update in real time. I wanted to apply that same approach here.


A Quick Tour

Instead of just writing static text, I built several custom widgets and sandboxes to show what happens when you compile and serialize protobuf data.

Deep Dive into the Basics

The Basics section covers schema design syntax and core protobuf concepts like enums, nested messages, repeated fields, maps, and oneofs. Code comparisons help explain primitive scalars, Google’s Well-Known Types, and optimal integer guidelines.

Visualizing the Wire Format

The Binary & Wire Format page contains the core interactive tools on the site, and it is the section I am most interested in getting your thoughts on. It explains some basics of working with binary and then it breaks down how bytes are physically laid out on the wire:

  • Varint Explainer: An interactive bit-level calculator. Input any integer to see how it converts from decimal to binary, splits into 7-bit groups, attaches continuation flags (MSB), and outputs final hex bytes.
  • ZigZag Explainer: Input signed numbers and watch how the sign bit shifts to the LSB, showing the resulting bit arrangement and ZigZag value.
  • Tag Calculator: Select a field number and a wire type to see the mathematical shift (<< 3), bitwise OR operations, and the resulting hex tag byte.
  • Interactive Wire Type Visualizers: Flowcharts that explain wire-type parsing for Varints, Fixed width (32-bit and 64-bit), and Length-delimited payloads.
  • Binary Explorer (Segment Inspector): An interactive split layout. You write a custom protobuf schema and standard JSON data. The tool compiles the schema, encodes the JSON to raw binary bytes, and maps them to a hex grid. Hovering or clicking on individual bytes in the grid highlights them and opens an inspector pane that breaks down exactly which field number, wire type, length, or payload value those bytes represent. You can also toggle a live Protoscope view to see the binary translate into diagnostic text.
The Binary Explorer split layout showing a schema compiling to a raw hex grid
  • Protoscope Lab: A diagnostic sandbox where you can write raw Protoscope text on the left and see it compile into hex bytes on the right.

I am particularly interested in whether this section hits the mark. Are these visualizations actually helpful for understanding the low-level encoding, or do they feel too contrived?

The Varint Explainer widget showing a live bit-level decimal to binary conversion

Real-Time Benchmarking & Efficiency

The Efficiency & Performance page features a simulator with a JSON editor on the left and live metrics on the right.

You can write your own JSON structure or load preset profiles (Basic User, Nested Data, Packed List). The app compiles the schema, encodes the JSON into protobuf binary, and runs both payloads through browser-native GZIP compression. It renders bar charts comparing minified/gzipped JSON versus protobuf binary sizes, showing the payload reduction ratio. It also includes alerts for things like Gzip overhead if your payload is too small to benefit from compression.

Real-time dashboard rendering animated bar charts that compare JSON and Protobuf payload sizes

Options, Reflection, and Validation

The Tooling & Reflection and Advanced pages contain two developer sandboxes:

  • Descriptor Playground: Write protobuf schemas and inspect the compiled FileDescriptorSet JSON metadata structure in real time. You can download the output directly as a raw binary descriptor (descriptor.bin) or a JSON file.
  • Validation Lab: An interactive sandbox illustrating the protovalidate specification. You can write schemas containing CEL (Common Expression Language) validation rules (like this.age >= 18) and test them against JSON payloads. If violations occur, the page displays a list of validation errors, naming the violating fields and the failed constraint rules.

The Protobuf Ecosystem

This page contains a searchable index of protobuf-related projects, including compilers, linters, formatters, validators, RPC frameworks, and language-specific tooling. Whether you’re looking for a code generator, validation framework, or language-specific library, the explorer makes it easier to discover tools across the broader protobuf ecosystem.

Explore the complete list at protobuf.kmcd.dev/ecosystem.


Powered by WebAssembly (WASM)

Building interactive compilers in a web browser usually requires a round-trip to a backend server or rewriting everything in TypeScript. To avoid the server costs of passing custom schemas to a backend or the development time of porting several different libraries to TypeScript, this site runs Go’s compiler tooling directly inside the browser using WebAssembly.

As I noted in Zero-Friction Demos with WASM, compiling Go libraries into WASM works really well for client-side tools. The WASM binary handles the schema compilation, JSON-to-binary serialization, and Protoscope compilation natively on the client. It is fast, private, and works offline.

Give it a Spin

If you want to look at the lower-level mechanics of Protocol Buffers, or if you just need a zero-install scratchpad to inspect wire formats and CEL validations, check out the site starting from the Introduction:

👉 protobuf.kmcd.dev

The source code and widgets are open source and available on GitHub at sudorandom/protobuf.kmcd.dev. Please give the site a try and let me know your thoughts (especially on the binary section), bug reports, or suggestions!