1D vs. 2D barcodes
Linear (1D) barcodes encode data as a series of parallel bars of varying widths, read left to right by a laser or camera scanner. They hold a limited amount of data (usually just a number or short alphanumeric string) but are fast to scan and universally supported by inexpensive hardware.
2D barcodes like QR codes and Data Matrix encode data in a grid pattern, both horizontally and vertically. They can hold hundreds of characters URLs, batch numbers, expiry dates, or serial numbers and can be read from any angle, even partially damaged, using error correction built into the format.
- 1D: UPC, EAN, Code 128, Code 39 low data capacity, fast scan, universal hardware support
- 2D: QR code, Data Matrix high data capacity, omnidirectional scan, phone-camera friendly
UPC and EAN: retail barcodes
UPC-A (Universal Product Code, 12 digits) is standard in the US and Canada; EAN-13 (European Article Number, 13 digits) is standard everywhere else, including for products sold internationally. Both are fixed-length numeric codes tied to a GTIN (Global Trade Item Number) that a business licenses through GS1.
You cannot invent a UPC or EAN for a product you plan to sell at retail or on major marketplaces the number must be registered so it uniquely and permanently identifies that product worldwide. If a supplier's product already carries a UPC or EAN, map it to your internal SKU rather than replacing it with your own code.
Code 128: the default for internal inventory
Code 128 is a high-density, variable-length 1D symbology that encodes any combination of letters, numbers, and some symbols. It is the most common choice for internal warehouse labels SKUs, bin locations, lot numbers because it needs no license, scans reliably on any 1D scanner, and fits a compact label.
Most inventory software, including StockFlow, generates Code 128 barcodes automatically from your item records. Because the code is tied directly to your SKU, reprinting a damaged label or adding a new item never requires manually assigning a new number.
Code 39: the older alphanumeric standard
Code 39 was one of the first alphanumeric barcode symbologies and remains common in manufacturing, defense, and some logistics systems that adopted it decades ago. It encodes uppercase letters, digits, and a handful of symbols, but is less data-dense than Code 128 the same string takes up more physical space.
Unless you are integrating with an older system that already standardized on Code 39, new inventory setups should use Code 128 instead it holds the same character set more compactly and scans just as reliably.
QR codes and Data Matrix: 2D codes for extra data
QR codes are the most widely recognized 2D symbology, scannable by any modern smartphone camera without a dedicated app. For inventory, they are useful when a single label needs to carry more than an identifier a batch number, expiry date, or a link to a product page or manual.
Data Matrix codes serve a similar purpose in a smaller footprint, which is why they are common on small parts, electronic components, and medical devices where label space is limited. Both formats include error correction, so a partially torn or smudged label can often still be read correctly.
- QR: best for phone-camera scanning and consumer-facing labels
- Data Matrix: best for very small labels with limited surface area
Which barcode type should you use?
For products you sell at retail or through major marketplaces, use the licensed UPC or EAN already assigned to the product. For internal warehouse and inventory labels bins, shelves, lot numbers use Code 128 generated from your SKU; it needs no license and scans on any standard hardware.
Reach for a QR code or Data Matrix only when you need to encode more than an identifier on a single label, such as a batch number and expiry date together, or when your team scans primarily with phone cameras rather than dedicated 1D scanners.
Generate the right barcode type for every item
StockFlow generates Code 128 barcodes from your item master and scans UPC, EAN, and QR codes with any phone camera no separate barcode software required.
Trusted by small businesses
What our customers say
“Super Kind! Quick replies from their support and very easy fixes, changed the dashboard a bit and customized it. Also gave me 450 items extra on the free plan just for me. Highly recommend and again great service!”
“Best customer service! Stockflow's customer support is fast and extremely helpful. They assisted me with customization of the software to improve my experience as a user.”