Barcode Generator (EAN-13, UPC-A, Code 128)
Make EAN, UPC, Code 128 and Code 39 barcodes with check digits.
12 digits (check digit added) or 13 digits (check digit verified).
Your barcode will appear here.
Use via API
Generate a 1D barcode as SVG: EAN-13, UPC-A, EAN-8 (check digit added or verified), Code 128 or Code 39. Send JSON, get JSON back.
POST https://pithlab.com/api/v1/tools/barcode-generator
curl https://pithlab.com/api/v1/tools/barcode-generator \
-H "Authorization: Bearer $PITHLAB_KEY" \
-H "Content-Type: application/json" \
-d '{"value":"400638133393","symbology":"ean13"}'About the Barcode Generator
Create EAN-13, UPC-A, EAN-8, Code 128 and Code 39 barcodes with automatic check digits and readable text. Download them as sharp SVG or PNG files.
How to use the Barcode Generator
- Pick the barcode type. Retail products use EAN-13 (or UPC-A in North America); shipping and inventory labels often use Code 128.
- Enter the data. For EAN and UPC you can leave off the check digit and it will be calculated, or include it to have it verified.
- Adjust the bar height and module width, and choose whether to show the human-readable text.
- Download an SVG for print or a PNG for documents, and test scan it before printing in bulk.
Examples
Input
EAN-13: 400638133393
Output
4006381333931
Input
UPC-A: 03600029145
Output
036000291452
Input
EAN-8: 9638507
Output
96385074
Input
Code 39: CODE39
Output
*CODE39W*
Frequently asked questions
Can I use these barcodes on products I sell in shops?
The barcode itself will be correct, but retailers need a number that is registered to your company. Get your EAN or UPC numbers (GTINs) from GS1 for your country, then enter them here to make the artwork.
How is the check digit worked out?
For EAN and UPC, the digits are weighted 3 and 1 alternately from the right, added up, and the check digit is whatever brings the total to the next multiple of 10. Code 128 always includes a mod 103 checksum, and Code 39 can add an optional mod 43 character.
Which should I use, Code 128 or Code 39?
Code 128 is more compact and supports upper and lower case letters, digits and punctuation. It switches to a denser digit-pair mode automatically for long runs of numbers. Code 39 is simpler and older, and only supports uppercase letters, digits and a few symbols.
How big should I print a barcode?
For EAN-13 the nominal size is about 37 mm wide by 26 mm tall, and it can usually be scaled between 80% and 200%. Keep the white space on both sides, print in black on white, and don't shorten the bars too much.
Is anything uploaded?
No. The barcodes are encoded and drawn in your browser, and nothing you enter is sent to a server.