A free, no-signup tool for creating UPC-A, EAN-13, EAN-8, and UPC-E barcodes. Downloads as SVG or PNG with proper quiet zones and automatic check digit calculation.
The check digit is calculated automatically. Hit randomize for a quick test code. Toggle the quiet zone for GS1-compliant exports — required if you're printing labels for retail.
11 digits required
A barcode is a way of encoding numbers as a pattern of black bars and white spaces that a machine can read. The bars don't carry any meaning by themselves — they're just a printable alphabet for digits, the way Morse code is a printable alphabet for letters.
When a scanner runs across a barcode, it measures the widths of the bars and gaps and translates them back into the original digits. That sequence of digits is then looked up in a database — your store's inventory system, a national product registry — which is where the actual product information lives. The barcode itself doesn't know what's in the box. It just says 036000291452, and the database does the rest.
The format you'll see on most retail products in North America is UPC-A, a 12-digit code introduced in 1974 when a pack of Wrigley's gum became the first item ever scanned at a grocery checkout. The European equivalent, EAN-13, came along in 1977 and added a digit to accommodate country prefixes. Today these two standards (along with their compact siblings EAN-8 and UPC-E) sit on essentially every consumer product in the world.
Every retail barcode you've ever scanned has the same four-part structure. Once you can name them, you can read a barcode the way a typesetter reads a column of text.
Empty white space on either side of the bars. Looks like nothing, but scanners need it to find where the code starts and ends. GS1 requires nine modules wide on each side.
Tall bars at the start, middle, and end. They're slightly longer than the data bars so scanners can find them quickly and use them as reference points for measuring the rest.
Each digit becomes a unique seven-bar pattern. UPC-A and EAN-13 split these into a left and right half, with each half using a different encoding so the scanner knows which way is up.
The last digit is calculated from the others using a simple weighted formula. If a scanner mis-reads a bar, the math doesn't work out, and the scan gets rejected. We compute this for you automatically.
The four retail barcode standards all encode digits, but they differ in length, geographic use, and what kind of product they're meant for.
The standard barcode on virtually every retail product sold in the United States and Canada. The first digit is a number system identifier (typically 0 for most products, 2 for variable-weight items like meat, 3 for pharmaceuticals). The next five digits identify the manufacturer, the following five identify the product, and the last is the check digit.
The international standard, used in nearly every country except the US and Canada (which use UPC-A — though most modern scanners read both). EAN-13 starts with a 2 or 3 digit country prefix that tells you where the issuing GS1 organization is located. Books and magazines use a special version called Bookland EAN that encodes ISBN and ISSN numbers.
A shorter international format for small products where a full EAN-13 won't physically fit — think a stick of gum, a small candy bar, or a single-serving sachet. EAN-8 codes are issued separately from EAN-13 codes and aren't a compression of them; they're their own number space, allocated only when a regular code can't be printed legibly.
A clever compression of UPC-A. If a UPC-A code has lots of zeros in specific positions, it can be squeezed down to six visible digits (plus a leading zero or one and a check digit). The scanner expands it back to the full 12-digit form. Used on small US products where UPC-A would be too wide. Only number systems 0 and 1 can be encoded this way.
This generator produces technically valid barcodes — the bars encode correctly, the check digits are right, and a scanner will happily read them. That makes them perfect for testing, mockups, prototypes, internal inventory systems, school projects, and anywhere you need a barcode that works but doesn't need to be globally unique.
For products you intend to sell at retail, however, you need a real GS1-issued company prefix. Major retailers (Amazon, Walmart, Target, every grocery chain) verify that the manufacturer prefix in your barcode is registered to your company in the GS1 global database. A randomly generated number might scan, but it won't pass that verification — and in the worst case it could collide with another company's real product.
→ If you're going to sell on a major marketplace, get a real prefix from gs1.org first. For everything else, this tool has you covered.
Etsy and small-batch makers who need barcodes for in-house inventory tracking, before scaling to GS1-registered codes.
Engineers building POS systems, inventory apps, or warehouse software who need realistic test data without seeding a database.
Packaging and print designers laying out product mockups who need a placeholder barcode that looks completely real on the comp.
Computer science and math instructors covering encoding, error detection, and the mod-10 check digit algorithm with hands-on examples.
Warehouse, library, and asset management teams who need scannable codes for items that never leave the building.
People who saw a barcode, wondered how it worked, and are now reading the SVG output we generate to figure out the encoding.