FREE DEVELOPER TOOL

UBX CK_A CK_B Checksum Calculator

Calculate u-blox UBX message checksums instantly in your browser. Enter a UBX message in hexadecimal format and generate CK_A and CK_B values with a clear validation result.

Free No Registration Browser-Based Privacy-Friendly

UBX Checksum Calculator

Calculate or validate UBX message checksums.

How Does the UBX CK_A CK_B Checksum Work?

UBX messages use two checksum bytes: CK_A and CK_B. The checksum is calculated over Class, ID, Length and Payload. The sync bytes B5 62 are excluded.

Class ID Length Payload CK_A / CK_B

CK_A accumulates each byte, and CK_B accumulates the running CK_A value. Both operate modulo 256 (8-bit).

UBX Checksum Algorithm

Readable pseudocode for the UBX checksum calculation.

// UBX checksum calculation CK_A = 0 CK_B = 0 for each byte in (Class + ID + Length + Payload): CK_A = (CK_A + byte) & 0xFF CK_B = (CK_B + CK_A) & 0xFF // Output: CK_A, CK_B

The checksum bytes themselves are not included in the calculation. Both values are 8-bit (0–255) and displayed in hexadecimal.

UBX Message Structure

Every UBX message follows this frame format.

Field Size Value / Description
SYNC CHAR 1 1 byte B5 — fixed sync pattern
SYNC CHAR 2 1 byte 62 — fixed sync pattern
CLASS 1 byte Message class (e.g. 01 = NAV, 05 = CFG)
ID 1 byte Message identifier within the class
LENGTH 2 bytes Payload length (little-endian)
PAYLOAD Variable Message data (0–N bytes)
CK_A 1 byte Checksum byte A
CK_B 1 byte Checksum byte B

Sync bytes B5 62 and checksum bytes CK_A CK_B are not part of the checksum calculation.

Verified UBX Examples

Use these examples to test the calculator. Each includes the full UBX message and the expected CK_A / CK_B values.

Example 1 — Zero Payload

Message: B5 62 01 07 00 00 08 19

CK_A: 08  |  CK_B: 19

Class=01, ID=07, Length=00 00 (0 bytes payload)

Example 2 — With Payload

Message: B5 62 05 00 02 00 01 00 08 28

CK_A: 08  |  CK_B: 28

Class=05 (CFG), ID=00, Length=02 00 (2 bytes payload: 01 00)

Example 3 — NAV-PVT (simplified)

Message: B5 62 01 07 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1C 1D

CK_A: 1C  |  CK_B: 1D

Class=01 (NAV), ID=07 (PVT), Length=14 00 (20 bytes payload)

Common Use Cases

Where UBX checksum calculation is essential.

u-blox GPS development
GNSS receiver testing
UBX protocol debugging
Embedded systems
Serial communication testing
Firmware development
GPS module troubleshooting
UBX message validation

Troubleshooting

Why is my checksum invalid?

Check that you've entered the correct bytes and that the payload length matches the length field.

Should B5 62 be included?

No. The sync characters are excluded from the checksum calculation.

Should CK_A and CK_B be included?

No. They are the output, not input.

Can I enter lowercase HEX?

Yes. The tool normalizes both uppercase and lowercase.

Can I enter HEX without spaces?

Yes. Spaces are ignored during parsing.

Why does my payload length fail validation?

The length field (2 bytes, little-endian) must match the actual payload size.

Frequently Asked Questions

UBX is the proprietary binary protocol used by u-blox GPS and GNSS receivers for communication, configuration and data transfer. It is a compact, frame-based protocol with built-in checksum validation.
CK_A and CK_B are the two checksum bytes used in UBX messages to verify data integrity. They are calculated over the Class, ID, Length and Payload fields using a simple additive algorithm.
The checksum is calculated by iterating over each byte from Class through Payload. CK_A accumulates each byte, and CK_B accumulates the running CK_A value. Both operate modulo 256 (8-bit).
No. The sync characters B5 62 are not included in the checksum calculation. Only Class, ID, Length and Payload are used.
Yes. This tool calculates UBX checksums entirely in your browser with no data sent to any server.
No. All processing happens locally in your browser. Your UBX data is never sent to our server or any third party.
The tool accepts hexadecimal input with or without spaces. Both uppercase and lowercase hex characters are supported.
Yes. Enter the full UBX message including sync bytes and checksum, and the tool will validate whether the checksum is correct.
Generation computes CK_A and CK_B from the data bytes. Validation compares the computed checksum against the provided checksum bytes to verify message integrity.
No. CK_A and CK_B are the output of the checksum calculation and are not included as input to the algorithm.

🔒 Your Privacy Matters

Your UBX data is processed locally in your browser and is not sent to our server. No data is stored, logged or shared. This tool works entirely offline after the page loads.

Contact

Email: contact@microtoolsweb.com

We aim to respond within 48 hours.

Disclaimer

This tool is provided for convenience and development/testing purposes. Always verify critical checksum calculations against the official u-blox documentation and your target device implementation.