Skip to content
UniKit

BCC XOR checksum

Compute a BCC (Block Check Character) XOR checksum — either byte-wise or over 16-bit big-endian words. Input can be UTF-8 text, hex, Base64 or decimal bytes, and the output is hex (optionally uppercase) or decimal. It only catches an odd number of bit flips: an error-detecting code with no confidentiality or tamper resistance.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Content to check

Checksum

An XOR checksum only catches an odd number of bit flips.

Enter content to see the checksum

Checksum (decimal): 0 · Input bytes: 0 · Unit width: 0

What this tool does

  • Compute the trailing checksum byte of industrial frames (DL/T 645, some Modbus dialects).
  • Check quickly whether a single byte of a hex message was altered.
  • Compare with LRC and CRC to pin down which checksum a manual means.

Example

Input

abc

Output

60

Hand-checkable: BCC(123456789) = 31 and BCC(abc) = 60; with 16-bit words BCC(abc) = 0262.

Frequently asked questions

Does BCC protect against tampering?

No. An XOR checksum catches an odd number of flipped bits; two flips cancel out and anyone can craft a message with the same checksum. It is the cheapest kind of communication-layer error check and nothing more.

Should I use byte or word units?

Follow the device documentation. Byte-wise XOR is most common; some protocols xor 16-bit big-endian words instead, and mixing them up yields completely different values.

How can I verify the result?

By hand: the ASCII xor of 1..9 is 0x31^0x32^...^0x39 = 0x31, and abc gives 0x61^0x62^0x63 = 0x60. This tool matches both.

What happens with empty input?

It returns 0, the identity element of XOR, instead of failing; only malformed hex, Base64 or decimal bytes raise an error.

Keywords:BCCXOR checksumDL/T 645

Related tools