How upcgenerator.app draws barcodes on your device
The evidence behind the claims on the UPC generator: what draws each barcode, the sizes and check digit rule it follows, how the barcodes are read back in tests, its limits, and how to check that what you type stays on your device.
Updated
Open the UPC generatorWhat happens to what you type
The number or text you type stays in the page. Your browser encodes it with bwip-js 4.11.4, an open-source barcode library (MIT license) that the site serves from its own address, and shows the result on a canvas. The SVG, PDF, PNG, ZIP, label sheet and CSV files are written in your browser. Lists (Many at once and Check digits) are worked through in a background worker on your device, so the page keeps responding. Nothing is sent anywhere, and once the page has loaded it works with no internet connection. The versions and licenses of every library the site uses are in the file /licenses.txt on this site.
The tool never makes up a number. For the numeric types it only adds or checks the check digit of the number you typed.
How a barcode is drawn
bwip-js works out the bars, squares and the shapes of the digits under them. The site records those shapes once, in units of the X-dimension, and writes all three files from that one list: the SVG as paths with its width and height in millimeters, the PDF as one vector page exactly the size of the barcode, and the PNG as pixels at the dpi you chose. So the three files cannot differ, and the SVG and the single-barcode PDF hold no font that another computer might replace: the digits are outlines too. A test draws the PNG, the SVG and the PDF at 10 pixels per module and checks that they agree everywhere except within 3 pixels of an edge. On a label sheet PDF, captions in Latin letters are set in the PDF's built-in Courier font, and captions in other scripts are drawn as a 600 dpi picture.
A PNG has whole pixels, so its X-dimension is rounded to them, and the PNG says its own dpi so that it prints at that size. When the rounding changes the printed X-dimension by more than 2 percent, the tool shows "Rounding to whole pixels changes the printed X-dimension by more than 2%. Use SVG or PDF for the exact size." For UPC-A at 80 and 100 percent that happens at all of 300, 600 and 1200 dpi: 0.330 mm is 3.9 pixels at 300 dpi and is drawn as 4, 2.6 percent wider; 0.264 mm becomes 3 pixels, 3.8 percent narrower. Print from the SVG or PDF.
Sizes and quiet zones
For UPC-A, UPC-E, EAN-13, EAN-8 and ISBN, the magnifications 80, 100, 150 and 200 percent set the X-dimension to 0.264, 0.330, 0.495 and 0.660 mm, and the bar height grows with the X: 22.85 mm at 100 percent for UPC-A, UPC-E, EAN-13 and ISBN, and 18.23 mm for EAN-8. For the other types you type the X-dimension, from 0.1 to 2 mm (it starts at 0.25 mm), and for the linear ones the bar height, which starts at 12 mm and can be set up to 500 mm. With Include quiet zones on, as it is when the page opens, the retail quiet zones are drawn at these widths from the GS1 General Specifications, Release 26.0, Table 5-11 and sections 5.3 and 5.4:
| Type | Left quiet zone | Right quiet zone | Width at 100 percent |
|---|---|---|---|
| UPC-A | 9X | 9X | 113 modules, 37.29 mm |
| EAN-13 and ISBN | 11X | 7X | 113 modules, 37.29 mm |
| UPC-E | 9X | 7X | 67 modules, 22.11 mm |
| EAN-8 | 7X | 7X | 81 modules, 26.73 mm |
| Five-digit add-on | a gap of 9X after UPC-A, 7X after EAN-13 and ISBN (GS1 allows up to 12X) | 5X | with UPC-A or EAN-13: 165 modules, 54.45 mm |
| ITF-14 | 10X | 10X | set by the X-dimension you choose |
| GS1-128 | 10X | 10X | grows with the data |
Code 128 and Code 39 get 10X on each side, a PDF417 symbol 2X and an Aztec code 1X on every side.
ITF-14 has bearer bars, drawn as a frame 4X thick around the bars, on when the page opens (Draw bearer bars): GS1 makes the bearer bar mandatory unless it cannot be printed, and at least twice the width of a narrow bar for printing without plates.
The check digit rule
Check digits follow the GS1 General Specifications, section 7.9.1, which uses one algorithm for every fixed-length GS1 number: starting from the digit next to the check digit and moving left, multiply the digits by 3, 1, 3, 1 and so on, add the results, and subtract the sum from the nearest equal or higher multiple of ten. With 11 digits for a UPC-A (or 12 for an EAN-13 or ISBN-13, 7 for an EAN-8, 13 for an ITF-14), the tool adds the digit and says which one it added: "Check digit 2 added: 036000291452". With the full length, it checks the last digit and says "Check digit is correct" or, if it is wrong, "The check digit should be 2, not 7." A UPC-E takes 6, 7 or 8 digits; its check digit is calculated from the UPC-A it stands for. Any other length gets a message that names the lengths the type takes and the length typed.
How it is tested
The engine tests make 66 barcodes, six of each of the 11 types (with and without add-ons, bearer bars, the Code 39 check character and the number under the bars), and read each one back with zxing-wasm, an open-source barcode reader, four ways: from the PNG pixels, from the SVG drawn by ImageMagick, and from the PDF drawn by two programs, pdftoppm and Ghostscript. Each reading must equal what was encoded, numbers with their check digit, and the add-on where there is one. Another 240 random numbers, 40 of each numeric type, are read back from their pixels.
The check digit function is tested against GS1's own worked examples and against 2,000 random numbers checked by a second function written separately in the test. The size is measured too: a UPC-A at 100 percent must be 37.29 mm wide with its quiet zones and have bars 22.85 mm tall, read from the PDF's page size and the SVG's attributes, within 0.02 mm, and the same at 80 and 200 percent. The widths of UPC-A, UPC-E, EAN-13 and EAN-8, with and without add-ons, are checked against GS1's module counts. A label sheet of 31 different numbers is drawn by pdftoppm and every label read in order, 30 on the first page and one on the second, and an X-dimension too wide for the label is refused. Hostile input is tested as well: a megabyte of digits, a line break, a 13-digit number as a UPC-A, letters in a number-only type, and options out of range.
Page tests drive the site in a browser with a script: a number typed and downloaded as SVG, PDF and PNG, each read back by the barcode reader, the SVG and PDF measured at 37.29 × 22.85 mm and the PNG's resolution checked; 11 digits getting their check digit, and a wrong 12th digit corrected with Fix it; a list of 40 with two bad lines making a ZIP of 38 files and a two-page label sheet whose 38 labels all scan; the check digit list with its CSV, and a list of 1,001 lines refused; each of the nine tool pages opening on its own type or panel; use offline; keyboard use, contrast and layout at 360 and 1280 pixels wide; and the network test described below.
Last tested: November 22, 2026, in Chrome, Safari's engine (WebKit) and Firefox: 8 page tests passed in each, and the engine's 19 tests passed.
Limits
Up to 3,000 characters in one barcode ("Use at most 3,000 characters per barcode.") and 1,000 lines in a list ("Use at most 1,000 lines."). The X-dimension is 0.1 to 2 mm and the bar height up to 500 mm. A PNG may have up to 16,777,216 pixels (16 megapixels); above that the tool says "This image is too large. Lower the resolution or use a vector format." A ZIP holds up to 128 MiB of files. On a label sheet, a barcode wider than its label is refused with the largest X-dimension that fits, and one too tall is refused with the advice to lower the bar height or X-dimension. A PDF417 symbol holds fewer than 3,000 characters (1,800 capital letters fitted at the automatic settings, 1,900 did not), an Aztec code holds less at high error correction, and the tool says "Shorten the value or change the barcode options to fit." Text for PDF417 and Aztec is one line: line breaks and other control characters are refused.
What the site does not do: it does not issue, register or look up UPC numbers, it has no QR code type, it does not make ID-card barcodes, it does not shorten a UPC-A into a UPC-E, it does not print the "ISBN" line above a book barcode, and it does not enforce GS1-128's limits of 48 data characters and 165.10 mm. Not tested yet: real phones, printed barcodes read with hardware scanners at a store checkout, label sheets printed on real label stock, and the PDFs in Adobe Acrobat; the tests read the barcodes from pictures of the files.
How to check that nothing is sent
You do not have to take this on trust. Three checks, from quickest to most thorough:
- Go offline. Load the UPC generator, turn off Wi-Fi, then type a number and download the barcode. It works as before, which could not happen if the number had to reach a server.
- Watch the network. Open your browser's developer tools, go to the Network tab, then type a number and download a file. The page fetches its own code from upcgenerator.app and, if analytics is on, sends small requests to Google Analytics and Microsoft Clarity. None contains your number, your text or a caption.
- Read the security policy. Every page is sent with a Content-Security-Policy header that tells the browser to block the page from sending data anywhere except upcgenerator.app, Google Analytics (with Google Tag Manager, which loads it) and Microsoft Clarity. Its
connect-srcline names only those.
Before each release, a test types markers as a number, an add-on, a text, a caption and a list line while both analytics services run, and fails if a marker reaches any request, any attribute of the page or the browser's storage. The barcode preview is a canvas, and Clarity does not record what a canvas shows. What the services receive is on the privacy page.