qr.cihat.dev

Barcode generator

Make a Code 128, EAN-13, UPC-A or EAN-8 barcode for labels, stock and packaging. Check digits are calculated, and every barcode is read back with a scan line before you download it.

Barcode type

Letters, digits, spaces and punctuation from basic English (ASCII). Long runs of digits are packed two per symbol.

Type a value and the barcode appears here.

How to use it

  1. Pick the type: Code 128 for your own labels, EAN-13 or UPC-A for retail product numbers, EAN-8 for small packs.
  2. Type the value. For EAN and UPC, leave out the last digit and the page adds the check digit.
  3. Set the bar height and, for PNG, the width of one module in pixels.
  4. When the line under the barcode confirms the read, download an SVG for print or a PNG at the chosen size.

Which barcode type to use

Scanners read all four, but they are meant for different jobs:

Barcode types and where they are used
TypeHoldsTypical use
Code 128Letters, digits and punctuation, any length that fits the labelShipping labels, inventory, asset tags, internal stock codes
EAN-1312 digits plus a check digitRetail products in most of the world
UPC-A11 digits plus a check digitRetail products in the United States and Canada
EAN-87 digits plus a check digitSmall retail packs with no room for EAN-13

Retail barcodes need a GS1 number

This page draws a correct EAN or UPC symbol for any number you type, but a shop’s till only knows your product if the number itself was issued to your company by GS1, the organisation that runs product numbering. Buy or request your numbers there first, then use this page to draw them. For your own shelves, bins and assets, Code 128 needs no registration at all.

Check digits and the read-back

EAN and UPC end in a check digit calculated from the others, so a scanner can reject a misread. Type one digit short and the page adds it; type the full number and the page tells you if the last digit is wrong and what it should be. Code 128 carries its own checksum symbol, added automatically.

After drawing, the page samples one line of pixels across the bars at the export size and at a small size, decodes it and compares it with your value. Downloads unlock only when both match.

Printing that scans

Print the SVG, keep the white margins on both sides (the quiet zones), and keep bars black on white. Thermal label printers work best with PNG at a module width that is a whole number of printer dots. On iPhone, Labelsmith does that snapping for you and prints to NIIMBOT and Phomemo label printers or AirPrint.

How the check digit is worked out

GS1 uses one method for every fixed-length number. Starting with the digit next to the check digit and moving left, multiply the digits by 3, 1, 3, 1 and so on, and add the results. The check digit is whatever brings that sum up to the next multiple of ten.

With the sample number in the box, 400638133393: 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 ten is 90, so the check digit is 1 and the full EAN-13 is 4006381333931. A sum that is already a multiple of ten gives 0.

Sizes GS1 allows for retail barcodes

GS1 sizes barcodes by the X-dimension, the width of one module. For checkout scanning, the GS1 General Specifications (Release 26.0) set these limits:

At the 0.330 mm target an EAN-13 is 37.29 mm wide including its quiet zones; the SVG from this page includes them, so setting it 37.29 mm wide gives exactly that. Bar height scales with the X-dimension, from 18.28 mm at the minimum to 45.70 mm at the maximum for EAN-13.

GS1 limits for EAN and UPC at checkout
SymbolX-dimension min / target / maxBar height at targetQuiet zone left / right
EAN-130.264 / 0.330 / 0.660 mm22.85 mm11 / 7 modules
UPC-A0.264 / 0.330 / 0.660 mm22.85 mm9 / 9 modules
EAN-80.264 / 0.330 / 0.660 mm18.23 mm7 / 7 modules

What the first digits mean

The first digits are a GS1 prefix. They show which GS1 office issued the number, not where the product was made: in GS1’s words, the company prefix "does not identify the origin of the item". Prefixes worth knowing, from GS1’s prefix table and GS1 Türkiye:

  • 868 and 869: numbers issued by GS1 Türkiye.
  • 20 to 29, and 02: restricted circulation numbers, defined by each country’s GS1 office for uses such as weighed products in a shop. They are not valid outside that market.
  • 978 and 979: books (ISBN). 977: serial publications (ISSN).
  • 952: reserved for demonstrations and examples. Use it on mock-ups and test labels instead of a real product’s number.

Code 128 and GS1-128

GS1-128 is Code 128 with an FNC1 character at the start and GS1 Application Identifiers such as (01) for the product number or (17) for the expiry date, capped by GS1 at 48 data characters. This page makes plain Code 128, which is right for your own labels; a warehouse that asks for GS1-128 needs a generator that writes FNC1.

Questions people ask

Is this barcode generator free?

Yes, with no account or watermark. Barcodes are drawn in your browser.

Can I make a barcode for my product to sell in shops?

You can draw it here, but the number must come from GS1 for retailers to accept it.

Which type for inventory labels?

Code 128. It holds letters and digits, is compact and is read by practically every handheld scanner.

Why is my EAN-13 rejected?

The 13th digit is a check digit. If it does not match the first 12, the page shows the correct one.

Can I make QR codes here too?

Yes, with the QR code generator on this site. QR codes hold far more data, including links.

What does a barcode starting with 869 mean?

The number was issued by GS1 Türkiye, which manages the 868 and 869 prefixes. It does not prove the product was made in Türkiye.

Can I make barcodes for products sold only in my shop?

Yes, for in-store use. GS1 reserves restricted circulation numbers for that (prefixes 20 to 29 in EAN-13), and each country’s GS1 office sets the rules. They do not work outside that market.

What size should I print an EAN-13?

The GS1 target is a 0.330 mm X-dimension: 37.29 mm wide with quiet zones and 22.85 mm tall. Do not go below 0.264 mm.