Homeโ€บ Developerโ€บ Barcode / QR Code Reference

Barcode / QR Code Reference

Generate a Code 128 barcode value or check-digit for UPC/EAN, and get specs for common barcode formats.

Inputs

Full encoded value
โ€”
Check digit
โ€”
Format
โ€”
Length
โ€”
Specification
โ€”

About Barcode / QR Code Reference

UPC check digit math

Sum digits at odd positions ร— 3, add digits at even positions, take modulo 10. The check digit is (10 - that mod) mod 10. Detects most single-digit and many transposition errors.

Generate the bars

This calculator gives the encoded value and check digit, not the rendered bars. Use a library like JsBarcode or bwip-js to generate actual printable barcode images.

QR vs barcode

Barcodes are 1D (lines), QR is 2D (squares). Barcodes hold 12-128 chars; QR up to 4,296 alphanumeric. QR has built-in error correction; barcodes do not.