Skip to content

James Allman | JA Technology Solutions LLC

Random-Weight UPC (Type 2) Decoder

Decode variable-measure UPC-A barcodes (number system 2) used on random-weight grocery items: item number, embedded price or weight, and check digits.

Random-Weight UPC (Type 2) Decoder

Decode the price- or weight-embedded "variable measure" UPC-A barcodes printed on random-weight grocery items like meat, deli, seafood, and produce. Number-system-2 barcodes carry an item or PLU number plus an embedded price (or weight) right in the digits. This tool extracts the number system, item number, and embedded value, validates the overall UPC-A check digit, and, for the four-digit-price layout, checks the embedded price-check digit. It supports both the four-digit-price-with-check layout and the simpler five-digit layout, with single and batch (one barcode per line) modes and CSV export.
Learn more ↓

Loading interactive explorer...

Before you use this output: The overall UPC-A check digit follows the GS1 standard, but embedded-field layouts (price vs weight, field width) and the price-check-digit algorithm vary by retailer and POS/scale configuration. Verify against your own configuration before relying on a result.

What Is a Random-Weight (Type 2) UPC?

Items sold by weight (fresh meat, deli, seafood, produce, bulk cheese) cannot carry one fixed UPC, because the price changes with the weight at the scale. Grocers solve this with variable-measure or random-weight barcodes that begin with number system 2. The store scale prints a UPC-A label that embeds the item or PLU number plus the calculated price (or, in some configurations, the weight) directly in the barcode. At the lane the POS reads number system 2, looks the item up by its embedded number, and takes the price straight from the barcode instead of a fixed price file.

How the Digits Are Laid Out

A common layout is 2 IIIII X PPPP C: number system 2, a five-digit item number, a single price-check digit, a four-digit embedded price (so 0399 is $3.99), and the standard UPC-A check digit. A simpler variant, 2 IIIII PPPPP C, uses a five-digit field and no price-check digit. The overall UPC-A check digit always follows the GS1 standard, so it validates the same way as any UPC. The price-check-digit algorithm is not uniform across the industry, so a failed price-check may simply mean a different convention is in use.

Keeping Scales, POS, and Host in Sync

Random-weight barcodes only ring correctly when item number, price, and weight stay consistent across the scale that prints the label, the POS that reads it, and the host item file that prices it. I build item-file and scale integrations that keep these flows aligned, and I help diagnose the mismatches behind scan-but-no-sale and wrong-price exceptions. See integration services, the UPC / GTIN converter, and the Check Digit Validator, or get in touch. Have questions? Ask James.

All tools run entirely in your browser. Your data never leaves your machine. Need help? Ask James.