Barcode Generator

Generate EAN-13, UPC-A and Code 128 barcodes with check-digit validation and SVG download.

EAN-13 vs UPC-A vs Code 128

EAN-13 is the 13-digit retail standard used worldwide outside North America. UPC-A is the 12-digit North American retail format. Code 128 is alphanumeric and compact — used for shipping labels, asset tags and internal tracking rather than retail checkout.

The check digit, explained

EAN-13 and UPC-A end with a check digit computed from the preceding digits: alternating weights of 1 and 3, summed, then the difference from the next multiple of ten. The generator computes it for you when you enter 12 (EAN) or 11 (UPC) digits, and validates it when you enter all 13 or 12.

Printing requirements

  • Print at 100% scale — resizing breaks scanner calibration
  • Keep the quiet zones (light margins) at least 10× the narrow bar width
  • Use matte black on white; avoid coloured or glossy stock
  • Verify with a real scanner, not just a phone app

Commercial use and GS1

Generating a valid barcode does not grant you a manufacturer prefix. Retail barcodes must use a GS1-issued company prefix so the number is globally unique. This tool performs the arithmetic and rendering; the licensing is separate.

Frequently Asked Questions

Why is my EAN rejected?

Wrong length or a check digit that does not match. Enter 12 digits and let the tool compute the 13th.

Can I generate a barcode for Amazon?

Amazon requires a GS1 prefix; you can render the image here, but the number must come from GS1.

Does the download include the numbers?

The SVG includes the human-readable digits below the bars, as retail standards require.

Privacy & Your Data

CSSmith runs entirely in your browser. Whatever you type, paste or upload is processed on your own device and never sent to a server — there is no backend to store it.