Code 128, EAN-13, UPC-A and Code 39 with check digits worked out. Download SVG or PNG. Made in your browser.
Code 128 holds any printable ASCII character: letters, digits, space and common symbols, up to 80 characters here. It has three character sets, and this page switches between them for you. Runs of digits are packed two to a symbol (set C), starting with four or more digits at the beginning or the end, or six or more in the middle, and everything else uses set B. A check symbol, worked out from all the others modulo 103, is added before the stop pattern. EAN-13 takes 13 digits, the common retail code outside North America. UPC-A takes 12 digits, the retail code in the United States and Canada. Code 39 takes capital letters, digits, space and the symbols - . $ / + %, up to 40 characters, wrapped in an asterisk at each end. Lower-case letters are made capitals and a note says so.
For EAN-13 and UPC-A the last digit is a check digit. Type one digit fewer, 12 for EAN-13 or 11 for UPC-A, and the page works it out and says which digit it added. Type the whole number and the page verifies it: if the last digit is wrong, the message tells you what it should be, and no barcode is drawn until you fix it. The sum weights the digits 3 and 1 alternately, counted from the right of the digits you typed, and the check digit brings the total up to a multiple of 10. Spaces and hyphens inside an EAN or UPC number are ignored. Code 128 always gets its own check symbol. Code 39 is made without the optional check character.
The thinnest bar is the module width, from 1 to 8 pixels, and every bar is a whole number of modules, so the edges stay sharp. Bar height runs from 20 to 400 pixels. The blank space on both sides, the quiet zone, is added for you: 11 modules on the left and 7 on the right for EAN-13, 9 on each side for UPC-A, and 10 for Code 128 and Code 39. Turn off the text and the digits are left out. For EAN and UPC the three guard bars and the digit groups are positioned the standard way. The SVG file holds only rectangles and the text, in two colours. The PNG is drawn at 2, 4 or 8 times the SVG size, and the page refuses a PNG that is too big for your device and suggests the SVG.
A barcode is only useful if the scanner reads it. Print a test at the final size, on the real material, and scan it with the scanner or phone that will be used. Very small module widths fail on rough paper or cheap printers, and printing a barcode much smaller or larger than planned can break a scan. A barcode on a product that is sold through shops needs a number issued for you by the body that manages these numbers in your country. This page encodes whatever valid number you type and does not issue, check or register product numbers. Your value is not saved or sent anywhere: only your type, size and text choices stay in this browser.
For a shop product sold in many countries, the number is EAN-13, or UPC-A in the United States and Canada. For internal labels such as a box number, Code 128 is compact and holds letters. Code 39 is older and wider, but some systems still ask for it.
Because its last digit does not match the other twelve. The message names the digit it should be. Type only the first 12 digits and the page adds the right check digit itself.
The PNG has a fixed number of pixels. At 4 times, a module width of 2 pixels becomes 8 pixels per module, so the edges are exact. The SVG has no pixels and prints sharply at any size, so use it for print work.
The image will be valid, but shops and marketplaces expect a number that was issued to you. Do not invent an EAN or UPC. Check what your seller platform or retailer requires, and test a printed copy with a scanner.
No. The barcode is built in this tab from your text. Only the barcode type, height, module width and the text option are remembered in this browser, never the value.