Barcode Generator
: Make Code 128, UPC-A, EAN-13, Code 39, ITF-14 and other barcodes in your browser, with check digits worked out, as SVG or PNG, one at a time or in bulk from a listOptions
Barcode Generator
A free barcode generator that runs in your browser: type or paste a value and get the barcode as SVG or PNG. It makes Code 128, GS1-128, Code 39, Code 93, EAN-13 (which covers ISBN), EAN-8, UPC-A, UPC-E, ITF-14, Interleaved 2 of 5, Codabar and MSI Plessey, adds a check digit when you leave it out and checks it when you type it. Paste a column from a spreadsheet and the same page becomes a batch barcode generator with ZIP downloads and a printable sheet.
How to make a barcode
- Choose the
Type. Not sure which? The notes below say when to use each one; Code 128 takes any text. - Type or paste into
Values, one value per line. The line under the box counts them. TheExamplesmenu has one for each type. - Set
Bar width (px)(the narrowest bar),Height (px),Text under the bars,Bar colourandBackground. For Code 39 there is alsoMod 43 check character. - With one line, the barcode appears large with its check digit, size and, for Code 128, the code sets used. Save it from
Filesas SVG or PNG, or take both in a ZIP. - With several lines, a table lists every line and marks the ones that could not be encoded. Use
All as SVG (ZIP),All as PNG (ZIP)orPrintable sheet (PDF, Letter);Sheet paperandSheet columnsappear once there are several lines.
Example
A 12-digit EAN-13 value left without its check digit. The tool adds it and shows the figures it would show you, at the default bar width of 2 px and height of 100 px. The same number with a wrong 13th digit, 5901234123450, is refused: "The check digit is wrong: it should be 7, not 0."
Type: EAN-13 / ISBN
Values: 590123412345Check digit 7 added.
Type: EAN-13 / ISBN
Encoded data: 5901234123457
Check digit: 7
Characters: 13
Modules wide: 95 + 11 quiet each side
Size: 234 × 120 pxDetails
- Which type? For your own labels, asset tags, SKUs or shipping references, use Code 128. It holds any ASCII text, and the tool picks the code sets itself: 12 characters of "ABC-12345678" take 134 modules by going A → C, with check symbol value 50. Code 39 is older and longer for the same data, but scanners everywhere read it and it needs no check character; it takes capitals, digits, space and - . $ / + % only, and
Mod 43 check characteradds one if a system asks for it. Code 93 is a denser Code 39 that also holds full ASCII, by writing lowercase and symbols as shift pairs. - Products sold in shops use GS1 retail types. EAN-13 takes 12 or 13 digits; UPC-A takes 11 or 12 (036000291452 is 03600029145 with check digit 2); EAN-8 takes 7 or 8 for small packs. UPC-E is the short form of a UPC-A whose number has zeros to drop: 0425261 is the UPC-E for 042100005264, and a UPC-A that cannot be shortened is refused with a pointer back to UPC-A. An ISBN-13 is an EAN-13 starting 978 or 979, so 978-0-306-40615-7 works as typed (hyphens are ignored) and the tool says it is the Bookland form. This is how to use it as an ISBN barcode generator.
- Check digits. For EAN, UPC and ITF-14 the last digit is computed from the others (GS1's mod 10 rule). Leave it out and it is added: 590123412345 becomes 5901234123457. Type the whole number and it is verified, and a wrong digit is refused with the right one named, which usually means a mistyped digit rather than a bad rule. ITF-14, the type for outer cartons, takes 13 or 14 digits (1540014128876 becomes 15400141288763). Plain Interleaved 2 of 5 takes digits and adds a leading 0 if the count is odd. MSI always adds a mod 10 check digit. Codabar gets start and stop A if you give none.
- GS1-128 is Code 128 with application identifiers in brackets, for example
(01)09501101530003(17)261231(10)ABC123(a trade item number, a date and a batch). The tool checks the lengths of the fixed-length identifiers it knows, checks the GTIN-style check digit of (00), (01), (02) and (41x), puts the FNC1 separators where they belong and holds up to 48 data characters per symbol. That example is 32 characters and 266 modules. - Size and print. Every barcode needs blank space on both sides, the quiet zone, and the tool adds it for each type (11 modules for EAN-13, 9 for UPC-A, 10 for Code 128). Keep it when you crop or place the image, and do not stretch the picture to a different shape. For print, save the SVG: it scales without blurring and any design tool takes it. For PNG,
Bar width (px)is the size of the narrowest bar in pixels, so choose it for the dpi you print at: at 300 dpi a 2 px bar is about 0.17 mm. GS1's nominal size for a retail EAN-13 is 37.29 × 25.93 mm at 100% magnification, which is a useful reference; other types have their own limits. Whatever you choose, print one and scan it with the scanner that will be used before you print a run. - Bulk. Paste a column from Excel or Google Sheets, or load a .txt or .csv with one value per line (up to 20 MB). Each line becomes its own barcode of the chosen type, and a line that does not fit is marked with the reason and left out of the downloads. There is no limit on the number of lines: a list over 2 million characters waits for
Make barcodes, then shows its progress with Cancel. The ZIPs hold one SVG or PNG per line, named from the value (unsafe characters become hyphens, duplicates get -2, -3). The PDF puts the codes on Letter or A4 in 1 to 6 columns, all at the same scale, as many pages as it needs. The page draws the first 12 as pictures; the downloads hold all of them. It works as a barcode generator for Excel lists without any add-in.
Limits
- One-dimensional barcodes only. QR codes are on the QR Code page (
/qr-code). There is no Data Matrix or PDF417. - It makes barcodes; it does not read or scan them. Test a print with a real scanner or a phone app before a run: the page does not check that a printed code scans.
- The page encodes numbers; it does not issue them. A retail UPC or EAN number is licensed from GS1 (your national GS1 office), and the prefix identifies the company. A number the page accepts is valid in form, not registered to you.
- Missing on purpose: ITF-14 bearer bars, the 2 and 5-digit add-ons on EAN and UPC (used on magazines and books), and a human-readable line for Code 128 control codes (they print as spaces). Code 39 is not full ASCII: lowercase is turned to capitals and any other character is refused. Plain Interleaved 2 of 5 gets no check digit, so add your own if your system needs one.
- A PNG larger than 32,767 px on a side or 16,777,216 px in area is refused with a note to use the SVG or a smaller bar width or height, because browsers cannot draw it. Bar width is 1 to 20 px and height 10 to 1000 px. The SVG has no such limit.
- Dark bars on a light background scan best; the page warns when the contrast between the two colours is low. A transparent background is allowed for SVG and PNG.
- Everything is drawn in your browser from the text you type. Nothing is sent to a server, and nothing is stored.
FAQ
What is a UPC barcode?
A UPC-A is the 12-digit retail barcode used on products in North America: 11 digits for the number system, manufacturer and product, and a 12th check digit. EAN-13 is the same idea with 13 digits for the rest of the world, and a UPC-A is an EAN-13 with a leading 0. This UPC code generator takes 11 digits and adds the check digit (036000291452 for 03600029145), or checks it if you type all 12.
How do I get a UPC barcode for my product?
You need a company prefix, and that is licensed by GS1. The numbers have to be yours, because shops and marketplaces look them up. Once you have a number, type it here to get the image. The page cannot give you a number that belongs to you.
What is the difference between Code 39 and Code 128?
Code 128 holds all ASCII characters, in less space: 134 modules for a 12-character value, with automatic code sets. Code 39 holds capitals, digits and a few symbols, and each character is wider. Pick Code 39 only when a system or customer asks for it; otherwise Code 128 is the shorter choice.
Why was my number refused, and what is a check digit?
A check digit is the last digit, worked out from the others so a scanner can spot a mistyped number. If the page says the check digit is wrong, it names the right one: The check digit is wrong: it should be 7, not 0. Either fix the typo or leave the last digit off and let the tool add it.
Is my data uploaded?
No. The barcodes are drawn in your browser, the ZIPs and the PDF are built there on click, and the values are not sent anywhere.
Runs entirely in your browser. Nothing is uploaded.