# Barcode Generator (EAN-13, UPC-A, Code 128) > EAN-13, UPC-A and Code 128 barcodes with check digits, true-size PDF, SVG and PNG. Make an EAN-13, UPC-A or Code 128 barcode. EAN/UPC check digits are calculated (or verified), Code 128 switches between code sets A, B and C for the shortest symbol, and the result prints at GS1 sizes with quiet zones and a test square. Part of usefulweb.app (https://usefulweb.app/). Part of [Printshop](https://printshop.usefulweb.app/) (ownerApp: printshop). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://printshopbarcode.usefulweb.app/ (interactive tool at https://printshopbarcode.usefulweb.app/tool) - JSON API: POST https://printshopbarcode.usefulweb.app/api/v1/calculate with a JSON object of inputs (schema: https://printshopbarcode.usefulweb.app/api/v1/tool) - OpenAPI: https://printshopbarcode.usefulweb.app/openapi.json - MCP (Streamable HTTP): https://printshopbarcode.usefulweb.app/mcp - tool `printshop_barcode` ## Inputs - symbology (select): Barcode type - data (text): Data - EAN-13: 12 digits (the check digit is added) or 13 digits (it is checked). UPC-A: 11 or 12 digits. Code 128: up to 80 ASCII characters. - magnification (number): Size (magnification) - EAN/UPC: 1 = 0.33 mm modules (GS1 nominal); Code 128: 1 = 0.30 mm modules. - height (number): Bar height (mm) - text (boolean): Print the digits under the bars - layout (select): Print layout - caption (text): Caption above the barcode - paper (select): Paper size ## Method - EAN-13: the first digit selects the L/G parity pattern of the left half (GS1 table), the right half uses R codes; the check digit is the mod-10 sum with weights 3 and 1 from the right. UPC-A is encoded as EAN-13 with a leading 0. - Code 128: a dynamic programme over (position, active code set) picks start code, CODE A/B/C switches and SHIFT for the fewest symbol characters; check value = (start + Σ value × position) mod 103. - Sizes: EAN/UPC module 0.330 mm × magnification (80–200 %), bar height 22.85 mm × magnification, guard bars 5 modules longer; quiet zones 11/7 modules (EAN-13), 9/9 (UPC-A), 10/10 (Code 128). ## Limits - Retail EAN/UPC numbers must be licensed from GS1; making a barcode does not register a product number. Check print quality with a scanner before mass printing.