gRPC Reserved Fields Builder
Turn a comma-separated list of field numbers and ranges such as 1,3,5-7 into a ready-to-paste reserved clause for a Protocol Buffers message.
Cláusula proto
—
Reserving removed field numbers in Protocol Buffers
In Protocol Buffers, what identifies a field on the wire is the number, not the name. Removing a field and later reusing that number makes the new field receive the old one's bytes — no error, no warning, the wrong value in the right place. The reserved keyword exists to make that impossible: the compiler refuses any attempt to reuse a reserved number.
Enter the removed numbers or ranges and the page assembles the declaration. Ranges use a hyphen, and several items are comma-separated. It is worth reserving the field name too, in a separate declaration, in case someone recreates a field with the same name under a different number — which confuses whoever reads the schema without breaking the encoding.
The rule of thumb is reserving whenever you remove, even in an internal schema. The cost is one line; the cost of not doing it is a data bug that only appears once two schema versions coexist in production, and it is among the hardest to track down, because the value arrives intact and in the wrong field. Note too that numbers 19000 to 19999 are already reserved by the protocol itself.
Frequently asked questions
Do I need to reserve the name too?
What is the difference between reserving and marking deprecated?
Which numbers should I avoid?
Related Tools
OIDC Discovery URL Builder
Paste an OpenID Connect issuer URL to get the discovery endpoint, with trailing slashes trimmed and /.well-known/openid-configuration appended for you.
Hosts File Builder from CSV
Paste ip,hostname pairs one per line and get tab-separated entries ready to drop into /etc/hosts; lines missing either field are skipped.
OAuth2 Authorization URL Builder
Assembles an OAuth 2.0 authorization URL from the endpoint, response_type, client_id, redirect_uri, scope and state, with every parameter URL-encoded.
Tailwind Config CLI Generator
Generate a ready-to-use tailwind.config.js for the Tailwind CLI, with content paths and theme set up. Copy it and start styling in seconds.
PX to REM and EM Converter
Type a pixel, rem or em value and the other two update live from your root font size, 16px by default, plus a table from 8 to 96 px in pt too.
Cron Generator
Generate cron expressions (5 fields: minute, hour, day, month, weekday) with common presets and natural-language description.