Canonical: https://toolipedia.app/bitfield-register-decoder

# Bit Field and Register Decoder

Define named bit fields by offset and width, decode a hex register or packet value into field values, or encode field values back into hex, with a byte order switch.

Breadcrumbs: Toolipedia > Developer tools > Code and developer utilities > Bit Field and Register Decoder

## About Bit Field and Register Decoder

Hardware registers and packet headers pack several small values into one number. Name each field with its lowest bit and width, for example PRESCALE 4 4 for bits 7 to 4, then paste a hex value to see every field in hex, decimal and binary. The same definitions work in reverse: give field values and get the combined register. A byte order switch decides whether the bytes you type are read most significant first or last. Example: with ENABLE 0 1, MODE 1 3 and PRESCALE 4 4, the value 0x78 gives MODE 4 and PRESCALE 7.

## How to use Bit Field and Register Decoder
1. Choose the register width and list the fields as NAME offset width, one per line.
2. To decode, type the hex value and set the byte order; to encode, enter a value for each field.
3. Read the table of fields, or copy the combined hex value and its bytes.

## Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.

## Also known as
- bit field and register decoder
- decode hex register
- bit field calculator
- register bits to fields
- packet header bit decoder
- encode bit fields to hex

## Frequently asked questions

### Is bit 0 the lowest or the highest bit?

Bit 0 is the least significant bit, as in most datasheets. If your datasheet counts from the most significant bit, convert each offset first, or write fields as hi:lo using the datasheet's own numbers.

### What does the byte order setting change?

It only changes how the typed bytes become a number. For 78 56 34 12, big-endian reads 0x78563412 and little-endian reads 0x12345678. The field decoding afterwards is identical.

### What happens when two fields overlap or a value is too big?

Overlapping fields are decoded anyway and listed in a warning. In encode mode a value that does not fit the field width is rejected with the allowed range.

### Is Bit Field and Register Decoder free?

Yes. Bit Field and Register Decoder on Toolipedia is free to use, with no sign-up and no watermark.

### Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

### Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

### Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

## Related tools

More free tools that go well with Bit Field and Register Decoder:
- [Protobuf Wire Format Decoder](https://toolipedia.app/protobuf-wire-format-decoder)
- [Bitwise Calculator](https://toolipedia.app/bitwise-calculator)
- [Half Precision, bfloat16 and Fixed-Point Converter](https://toolipedia.app/half-precision-bfloat16-and-fixed-point-converter)
- [Base32 and Base58 encoder](https://toolipedia.app/base32-base58-encoder)
- [ULID generator](https://toolipedia.app/ulid-generator)
