Protobuf Field Number Tracker
Paste your .proto file and instantly audit field numbers.
Detects duplicates, reserved range violations, Google reserved numbers (19000-19999), and encoding efficiency.
Frequently Asked Questions
Why do Protobuf field numbers matter?▼
Field numbers in Protocol Buffers are used for binary encoding — they identify fields in the serialized wire format, not names. Changing a field number is a breaking change: old clients and new clients will misread each other's data. Numbers 1-15 use one byte encoding, 16-2047 use two bytes — so frequently used fields should get low numbers.
What field numbers are reserved by Google?▼
Field numbers 19000 through 19999 are reserved by the Protocol Buffers implementation for internal use. Using them will produce a compile-time error in protoc. Numbers must also be positive integers between 1 and 536870911 (2^29 - 1).
What does 'reserved' mean in proto files?▼
The 'reserved' keyword prevents reuse of field numbers or names that were previously used by removed fields. This avoids accidental reuse which would cause data corruption when old serialized data is parsed by new code. Example: reserved 2, 15, 9 to 11; or reserved "foo", "bar";
How do I handle field number conflicts?▼
Each field in a message must have a unique field number. If you rename a field, the number stays the same (that's fine). If you remove a field, mark its number as reserved. Never reuse field numbers in the same message — the binary wire format uses the number as the field identifier.
What is the difference between proto2 and proto3 field rules?▼
In proto2, fields have explicit rules: required, optional, or repeated. In proto3, all singular fields are implicitly optional and the 'optional' keyword was only re-added in proto3 optional syntax. This tool handles both syntaxes and parses fields correctly regardless of label style.
Which fields should get numbers 1-15?▼
Fields you expect to be present in most messages — typically IDs, status flags, timestamps, and primary data payloads. Fields 1-15 encode in 1 byte vs 2 bytes for 16-2047, which can matter at scale. Map fields, repeated nested messages, and rarely-set optional fields can safely use higher numbers.
Related Products
on GumroadDevToolkit Starter Kit
A ready-to-deploy developer tools website with 12 built-in tools. Astro + Preact + Tailwind. Deploy to Cloudflare Pages for free. Built-in SEO, dark mode, and ad-ready layout.
Buy on Gumroad →TypeScript Quick Reference Toolkit
5 practical reference files for TypeScript developers: cheatsheet, TS vs JS comparison, 20 utility types with real examples, tsconfig best practices template, and 15 common mistakes guide. Print it. Keep it on your desk.
Buy on Gumroad →Developer Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →You Might Also Need
OpenAPI Validator
Paste your OpenAPI 3.x spec (YAML or JSON) to validate structure, find missing required fields, detect duplicate paths, check for missing operationIds, and get errors and warnings with path references.
Open free tool →
API Response Mock Generator
Generate realistic mock API responses with custom status codes, headers, and JSON body. Quick templates for 200, 401, 404, 429, 500 and more. Runs in your browser.
Open free tool →
API Response Time Tester
Test API endpoint response times directly from your browser. Run multiple requests, see average/min/max times, status codes, and response sizes. GET, POST, PUT, DELETE support. Free.
Open free tool →
More Free Tools
Related Articles
Base64 Encode/Decode Explained: When and How to Use It
Understand when to use Base64 encoding and when to avoid it. This guide explains the Base64 algorithm, practical use cases, code examples in JavaScript, Python, Go, and more.
JWT Token Decoder: How to Debug Authentication Issues
Learn how to use a JWT token decoder to diagnose 401 errors, expired tokens, missing claims, and auth misconfiguration. Practical debugging guide with code examples.
API Testing Tools Comparison 2025: Postman vs Insomnia vs Bruno vs Alternatives
Compare the best API testing tools in 2025: Postman, Insomnia, Bruno, Hoppscotch, and browser-based options. Features, pricing, and which to use for your team.
Base64 Decode Online: Instantly Decode Any Base64 String for Free
Decode Base64 strings instantly online — JWT payloads, API image data, env vars, and SSH keys. No install needed, no account. URL-safe variant supported.
Base64 Encoder Decoder: Complete Guide for Developers
Everything developers need to know about Base64 encoding and decoding. How it works, when to use it, common pitfalls, and a free online Base64 encoder decoder tool.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →