Quick answer: to make a barcode, type your data above, choose the symbology, and download the SVG or PNG. Code 128 handles any text (IDs, serials, URLs); EAN-13/UPC-A are the fixed-length retail codes; check digits are computed automatically β€” an EAN-13 needs exactly 12 digits, and the tool fills in the 13th using the standard 1-3 weighting (payload 400638133393 sums to 89, so the check digit is 1). Everything renders in your browser from vector data.

Barcode

Loading engine…
Symbology check
β€”
Check digit / notes
β€”
Rendering locally with etiket (MIT, zero dependencies). Nothing uploads.
Advertisement

Which Barcode Symbology Do You Need?

SymbologyCharacter setData lengthCheck digitTypical use
Code 128Full ASCII (128 chars)VariableAuto (mod 103, not printed)IDs, serials, logistics, healthcare
GS1-128ASCII + AI markersVariableAuto + per-AIShipment/pallet labels with dates, lots
Code 3943 chars: 0-9 A-Z space - . $ / + %VariableOptional mod 43Defense, automotive, legacy systems
EAN-13Digits12 + 1 checkMod 10 (1-3 weights)Retail POS worldwide
UPC-ADigits11 + 1 checkMod 10 (3-1 weights)Retail POS, US and Canada
UPC-EDigits6 + NS 0 + checkMod 10 on expanded formSmall packages, US retail
EAN-8Digits7 + 1 checkMod 10Tiny packages (candy, cigarettes)
ITF-14Digits13 + 1 checkMod 10Shipping cartons / outer cases
CodabarDigits + $ - : / . VariableNoneLibraries, blood banks (legacy)
MSIDigitsVariableOptional mod 10Warehouse shelf and inventory labels

Module counts at the defaults (2 px narrow bar): EAN-13 and UPC-A are 95 modules wide, EAN-8 is 67, UPC-E is 51 β€” so their SVGs come out 210, 154, and 122 px wide including a 10 px margin on each side. GS1 quiet-zone rules call for clear space of at least 10Γ— the narrow bar on both sides (UPC-A: 9Γ—; EAN-13: 11Γ— left, 7Γ— right). Keep it when you place the barcode on a label.

How the Barcode Generator Works

The page runs etiket, an MIT-licensed, zero-dependency barcode engine, entirely in your browser. You type data, it encodes the bars and spaces as vector rectangles, and the SVG it draws is what you download β€” there's no rasterizer in the middle, so a 2-inch label and a shipping-carton print stay equally sharp.

Check digits, computed live

EAN and UPC codes carry a final digit that guards against misreads. The engine computes it as it encodes, and the panel under the barcode shows the math. The algorithm: weight the payload digits 1,3,1,3… from the left, sum, and take the distance to the next multiple of 10.

How to use it

Pick the symbology first, because each one constrains what the data field accepts β€” Code 128 takes any text, EAN-13 wants 12 or 13 digits, UPC-E wants 6, 7, or 8. Invalid input gets a specific error (wrong length, bad character, bad check digit) rather than a silent blank. Set bar height and module width for your label size, toggle the human-readable text, and download. SVG for print, PNG for screens.

A worked example

Take the EAN-13 payload 400638133393. Weighted: 4Γ—1 + 0Γ—3 + 0Γ—1 + 6Γ—3 + 3Γ—1 + 8Γ—3 + 1Γ—1 + 3Γ—3 + 3Γ—1 + 3Γ—3 + 9Γ—1 + 3Γ—3 = 89. The next multiple of 10 is 90, so the check digit is 1 and the full code is 4006381333931. Type that in, and the tool renders a 95-module barcode (210 px at 2 px modules plus margins). Flip the last digit to 2 and the symbology check flags "Invalid EAN-13 check digit" β€” the sum would need to be 88, and it isn't.

Same idea, shorter codes: UPC-A payload 03600029145 gets check digit 2 (036000291452 on the package), EAN-8 payload 9638507 gets 4, and UPC-E 01234565 expands to the UPC-A 012345000065 β€” zero-suppressed codes always un-collapse to one specific 12-digit UPC.

Frequently Asked Questions

How do I create a barcode for free?

Type your data above, pick a symbology such as Code 128 or EAN-13, and the barcode renders instantly as SVG. Download the SVG for print or the PNG for documents. Both come out of your browser with no signup, no watermark, and no server round-trip, which matters if the data is internal product or patient information.

What is the difference between Code 128 and EAN-13?

Code 128 encodes any of the 128 ASCII characters at variable length, so it's used for serial numbers, license plates, and internal IDs. EAN-13 encodes exactly 12 digits plus a computed check digit, and it's the retail point-of-sale standard in most of the world. If a store will scan it at checkout, you need EAN-13 (or UPC-A in North America), and you need a real number from GS1, not an invented one.

How is the EAN-13 check digit calculated?

Take the 12-digit payload, multiply the digits by 1 and 3 alternately starting from the left (1,3,1,3...), add them up, and subtract from the next multiple of 10. For 400638133393 the weighted sum is 89, so the check digit is 90 minus 89, which is 1, giving 4006381333931. UPC-A and EAN-8 use the same algorithm with 11-digit and 7-digit payloads.

What's the difference between UPC-A and UPC-E?

UPC-A is the full 12-digit North American retail code: 11 digits plus a check digit. UPC-E is its zero-suppressed form for small packages, carrying 6 digits plus the number system (always 0) and a check digit. A UPC-E code expands back to exactly one UPC-A: for example 0123456 with number system 0 expands to 01234500006, whose check digit is 5, so the full UPC-A is 012345000065.

Can I invent my own EAN or UPC number?

You can generate the barcode image, but you cannot sell with it. Retail EAN and UPC numbers come from GS1, the global standards body, and major retailers reject codes whose company prefix isn't registered. Inventing one is fine for internal labeling, prototypes, and shelf tests, not for products that will pass through a store's checkout scanner.

Should I download SVG or PNG?

SVG for anything headed to print β€” labels, packaging, PDFs β€” because it's vector and scales to any size with crisp edges. PNG works for screens, office documents, and email. Either way keep the quiet zone (the blank margin on each side) intact: GS1 calls for at least 10 times the narrow bar width, and scanners misread barcodes whose quiet zones get cropped.

Advertisement