Text and writing
EAN and UPC barcode generator
Generate EAN-13, EAN-8 or UPC-A barcodes from your digits, calculate or verify the check digit and download the barcode as SVG or PNG.
ASCII digits only: EAN-13 requires 12 or 13, EAN-8 requires 7 or 8, UPC-A requires 11 or 12 digits. Module width 2–6 pixels, bar height 64/96/128/160 pixels; twelve white modules on each side.
Result
Method:
Numerical drawing, not GTIN assignment or registration lookup. No origin inference or certified print/scan quality. No UPC-E, Code 128, GS1-128 or supplementary codes. Scaling and printing can change scan quality; verify recipient requirements separately.
Decimal results are approximate. Inputs stay in this browser tab.
Sources
How it works
Numerical drawing, not GTIN assignment or registration lookup. No origin inference or certified print/scan quality. No UPC-E, Code 128, GS1-128 or supplementary codes. Scaling and printing can change scan quality; verify recipient requirements separately.
Worked example
Payload 123456789012 gives the numerical check digit 8. Unassigned example; no registered product.
Worked example
With these example values the calculator gives the result below. You can change any value in the form above.
Inputs
- Format
- EAN-13
- Digits
- 123456789012
- Module width
- 2 px
- Bar height
- 96 px
Result
- Complete numerical code
- 1234567890128
- Check digit
- 8
- UPC/EAN equivalent
- –
- Data and guard modules
- 95
- File width in pixels
- 238
- File height in pixels
- 136
Frequently asked questions
How do I generate an EAN-13, EAN-8 or UPC-A barcode?
Enter the digits, choose the format and the tool draws the barcode. You can then download it as SVG or PNG, or download the result as JSON or printable HTML.
How many digits does each barcode format need?
EAN-13 requires 12 or 13 digits, EAN-8 requires 7 or 8, and UPC-A requires 11 or 12. Only ASCII digits are accepted.
How is the check digit calculated?
Digits alternate between multiplying by 3 and by 1 from the right, then the sum is complemented to a multiple of ten. For example, payload 123456789012 gives check digit 8.
Can the generator check an existing check digit?
Yes. You can calculate or check the check digit. If you enter 13 digits for EAN-13, the last one is treated as the check digit.
What size options are there?
Module width is 2 to 6 pixels and bar height is 64, 96, 128 or 160 pixels, with twelve white modules on each side.
Does the tool assign or verify a GTIN?
No. It is a numerical drawing only, with no GTIN assignment, registration lookup, origin inference or certified print or scan quality.
Which barcode types are not supported?
UPC-E, Code 128, GS1-128 and supplementary codes are not supported. Scaling and printing can change scan quality, so verify recipient requirements separately.