Network & Web
VarInt Decoder
Decode one unsigned Protobuf VarInt from Hex bytes to exact decimal text. Inspect each continuation bit, payload, shifted contribution, and running total.
This tool runs open-source code from CyberChef by GCHQ (Apache License 2.0). See open-source credits.
Each byte contributes seven payload bits, with the lowest group first. Its high bit indicates whether another byte follows.
The result contains an exact unsigned decimal integer and a table of byte contributions.
- Check an unsigned field value after locating its byte range in a Protobuf capture.
Sources: Protocol Buffers: base 128 varints
Decode 96 01 as an unsigned integer
Input: 96 01
Settings: Hex bytes; one unsigned VarInt; no field tag.
Result: 150
Remove the continuation bit: 0x16 + (0x01 × 128) = 150. The engine returns the decimal string.
Check continuation bits and the terminating byte
- Paste the integer’s Hex bytes.
- Remove any Protobuf field tag first.
- Run the decoder and apply the field schema’s interpretation separately.
- Input must contain one shortest-form value without trailing bytes.
- The decoder does not apply ZigZag or signed LEB128 interpretation.
- A signed field can appear as a large unsigned result.