Built on advanced on-device AI and hardware acceleration to deliver professional-grade performance with uncompromising privacy.On-device AI — professional-grade, fully private.
Online Barcode Generator Tool
Barcodes in 19 formats, sized in millimetres for print.
- Nothing uploaded
- 19 formats · Code 128 to Data Matrix
- Sized in mm, not pixels
Drop a CSV or text file of values
One value per line. Free generates the first one.
Preview
Grouped by what the symbol is for, not alphabetically.
Any Latin-1 text. Digits are packed two to a symbol, so numbers stay short.
90° gives a ladder symbol, which is what a thermal label printer feeding vertically needs.
Compensates for ink spread. Your printer will give you the value.
This plan exports up to 300 dpi.
How to make a barcode
- 1
Pick the format
Choose the symbology your scanner or retailer expects. The picker groups them by job: retail (EAN, UPC), logistics (GS1-128, ITF-14), general purpose (Code 128, Code 39, Code 93), pharmacy (Pharmacode) and 2-D (Data Matrix, PDF417, Aztec).
- 2
Enter the value
Type the data to encode. The hint under the box gives the length and character set for the format you picked, and any check digit is calculated for you and shown.
- 3
Size it for where it will be printed
Use a size preset, or set the X-dimension directly in millimetres or mils. The tool shows the finished physical size and the pixel size at your chosen resolution before you export.
- 4
Export
Download PNG for a raster image, SVG or PDF for vectors that print at exactly the size you specified, or a sheet of labels. A batch comes back as one ZIP.
What each control does
The rail is grouped by the question each control answers: what to encode, how it should look, what the format itself needs, how big it is on paper, and what file you get.
Format and value
The format picker is grouped by job rather than alphabetically, because the choice is almost always dictated by where the symbol is going rather than by a preference. Switching format loads a valid example and the format's own nominal size, so the preview never goes blank while you work out what the new one wants. The hint under the value box gives the length and the character set, and the value is checked against them as you type.
Size, in millimetres
A barcode is a printed object with a specification, so this tool sizes symbols the way the specifications do: by X-dimension, the width of the narrowest bar. Presets cover the common cases; the precision fields take an exact X in millimetres or mils, or a GS1 magnification factor between 0.80 and 2.00 for the EAN and UPC family. The finished physical size and the pixel size at your export resolution are both shown before you download anything.
Colour, height and text
Bar and background colour take a hex value or a picker, and a value that is not a colour is flagged rather than silently replaced with black. Turning the background transparent puts the preview on a chequerboard so a white fill and a transparent one are not confused. The human-readable text can be switched off entirely, and the guard bars on an EAN or UPC symbol stop descending when it is — a descent with no text to descend past is a rendering artefact, not a standard.
Options the format itself needs
This group changes with the symbology, because most of these settings are meaningless outside one format. Code 39, Codabar, ITF and MSI take a narrow-to-wide ratio of 2:1 or 3:1. MSI takes one of four check-digit schemes. Codabar can print or hide its start and stop letters. ITF-14 can drop its bearer bars. EAN and UPC take a two- or five-digit add-on. PDF417 takes an error-correction level and a column count; Data Matrix takes a square or rectangular shape.
Output
PNG is a raster image at 72 to 1200 dpi. SVG and PDF are vectors sized in millimetres, so they arrive at the printer at the X-dimension you asked for instead of being scaled to fit. A sheet lays the batch out on a real label layout with a starting cell, so a part-used sheet is not thrown away.
The nineteen formats, and which one to use
Picking the wrong symbology is the most expensive mistake on this page, because the symbol scans perfectly and is rejected by the system it was made for. This is what each one is actually for.
Retail: EAN-13, EAN-8, UPC-A, UPC-E
These identify products at a checkout, and the number must be one your company owns through GS1 — a made-up thirteen-digit number will scan and will not resolve to anything. EAN-13 is the global standard and UPC-A its twelve-digit North American form; EAN-8 and UPC-E are the compressed versions for packages too small to carry the full symbol. UPC-E encodes six digits that expand back to a full UPC-A, which is why the tool shows you the expansion. The EAN-2 and EAN-5 add-ons carry an issue number or a price and sit to the right of the main symbol.
Logistics: GS1-128, ITF-14, Interleaved 2 of 5
GS1-128 carries structured data — a GTIN, a batch number, an expiry date — as a sequence of application identifiers, each introduced by its number in brackets. The tool parses that structure, checks each field's length and character set, verifies the GTIN and SSCC check digits, and puts the separators where the specification requires them rather than where they look right. ITF-14 is the carton symbol: fourteen digits, bearer bars, wide quiet zones. Plain Interleaved 2 of 5 is the same encoding without the GS1 framing, still used in warehouses and on airline tickets.
General purpose: Code 128, Code 39, Code 93
Code 128 is the right default for anything internal. It encodes the whole Latin-1 range, and it switches automatically between its three code sets so a run of digits costs half of what it costs in any other linear symbology. Code 39 is older, longer and only encodes upper case, digits and seven punctuation marks — but almost every scanner ever made reads it, which is why it survives in defence and automotive supply chains. Code 93 is Code 39's denser replacement with two mandatory check characters. Both have a Full ASCII variant that reaches the rest of the character set through shift pairs.
Specialist: Codabar, MSI Plessey, Pharmacode
Codabar is the blood bank, library and photo-lab symbology; its start and stop letters A to D are part of the data and identify the issuer, which is why a value like A12345A is correct rather than invalid. MSI Plessey is a shelf-label symbology whose check-digit scheme is dictated by the system reading it — pick the wrong one of the four and the symbol scans and then fails validation downstream. Pharmacode is not a character set at all: the number itself is the code, it reads right to left, and only the range 3 to 131070 exists.
Two dimensional: Data Matrix, GS1 DataMatrix, PDF417, Aztec
Data Matrix packs a lot into a very small square and is what goes on a circuit board, a surgical instrument or a pharmaceutical carton; GS1 DataMatrix is the same symbol carrying application identifiers. PDF417 is the wide stacked symbol on a driving licence or a boarding pass. Aztec needs no quiet zone at all, which is why transport tickets displayed on a phone screen use it. For a QR code, use the dedicated QR generator — it has the styling and error-correction controls that format needs.
Printing a barcode that actually scans
Most barcodes that fail were encoded correctly. They fail because of how they were sized, cropped or printed, and every one of these is visible in the tool before you export.
- Size by X-dimension, never by pixels — a symbol exported at 500 pixels wide is a different physical size on every printer. The X-dimension is the number the specification and the verifier both use.
- Do not crop the quiet zone — the clear space either side of the bars is part of the symbol. It is the single most common reason a printed barcode will not read, and it usually happens in a layout program after the barcode left this tool.
- Print vectors when you can — an SVG or PDF from this tool carries its size in millimetres. A raster image is resampled by whatever places it, and resampling a barcode softens exactly the edges a scanner is looking for.
- Ask your printer for a bar width reduction value — ink spread on press widens every bar. A press that needs 0.04 mm of reduction and does not get it produces a symbol that measures out of tolerance despite correct artwork.
- Keep the contrast high and the polarity right — dark bars on a light background. A scanner reads reflectance, not colour, so a red bar on a white background can be invisible to a red-light laser scanner even though it looks fine.
- Verify before a production run — print a proof at final size, scan it with the device that will be used, and check the value that comes back rather than that a beep happened.
Check digits, and what this tool does with them
A check digit is a digit calculated from the ones before it. A scanner recomputes it and rejects the read if it does not match, which is what stops a smudged barcode from quietly becoming a different product.
- It is calculated when you leave it out — type twelve digits for an EAN-13 and the thirteenth appears, with the complete number shown beside it.
- It is verified when you include it — type all thirteen and the digit is checked. If it is wrong the tool names the digit it should be and offers to correct the value, instead of refusing the input with no explanation.
- The same arithmetic covers EAN, UPC, ITF-14 and GS1 — they all use the modulo-10 scheme with weights of 3 and 1 counting from the right; they differ in length, not in method.
- Code 39's check digit is optional and modulo 43 — turn it on only if the system reading the symbol expects it, because a scanner that does not will report the check character as data.
- Code 93 always carries two — the C and K characters are mandatory in the standard, so there is no control for them.
- MSI has four schemes and they are not interchangeable — modulo 10, modulo 11, and the two double-digit variants. The system reading the label decides which one is correct.
GS1 application identifiers
A GS1-128 or GS1 DataMatrix does not carry a single number — it carries a series of labelled fields. Each field starts with a two- to four-digit application identifier that says what the rest of it means, and the brackets you type are notation for a structure the symbol stores as invisible separator characters.
- (01) GTIN — fourteen digits, the trade item number, with its own check digit verified here.
- (10) Batch or lot — up to twenty characters, variable length, so it must be followed by a separator unless it is last.
- (17) Expiry date — six digits, YYMMDD. A day of 00 is legal and means end of month.
- (21) Serial number — up to twenty characters, variable length.
- (00) SSCC — eighteen digits, the shipping container code, check digit verified.
- (3103) Net weight in kilograms — six digits, with the last digit of the identifier giving the decimal place.
The two rules that decide whether a GS1 symbol means what you intended are both about those separators: a fixed-length identifier is never followed by one, and a variable-length identifier always is unless it is the final field. Getting either wrong produces a symbol that scans and reports different data than you typed.
Batches, sequences and label sheets
One barcode at a time is the exception. Stock takes, asset tagging and sample runs all start with a list, and typing five hundred serial numbers by hand is not a workflow.
What Free includes
One barcode at a time, all nineteen formats, every appearance control, and PNG up to 300 dpi or SVG at any size. Nothing about the encoding is reduced: the symbol a free user exports is byte-for-byte the same symbol as a Pro user's at the same settings.
What Pro adds
Batches of up to 500 from a pasted list, an imported CSV, or a generated sequence with a prefix, start, step and zero padding. PDF and label-sheet export with a starting cell for a part-used sheet. Print precision — exact X-dimension in millimetres or mils, GS1 magnification, and bar width reduction. PNG up to 1200 dpi. The batch arrives as one ZIP, with duplicate values given distinct file names rather than silently overwriting each other.
Nothing is uploaded
Every symbol on this page is encoded and drawn on your device. No value you type reaches a server, nothing is stored, and the tool works with the network disconnected once the page has loaded.
- Product codes, patient identifiers and asset tags are exactly the kind of value that should not be posted to a third party to have a picture made of it.
- There is no watermark and no cap of ten barcodes before a signup — which is what the free tier of the closest commercial competitor actually gives you.
- The value list you import is read in the page and never leaves it.
How the output is checked
A wrong barcode does not look wrong. That is the whole problem with this category, and it is why correctness here is proven against implementations that have nothing to do with ours rather than against our own expectations.
- Module-level comparison — every linear symbology is compared bar for bar against BWIPP, the reference implementation most barcode software is built on. Twenty-seven cases across all thirteen linear formats match exactly.
- A decode round-trip — each symbol is rendered at export resolution and read back with ZXing, an unrelated decoder, and the value it returns is compared to the value that went in. That covers the drawing, the pixel snapping and the quiet zones as well as the encoding.
- The defects this found — three real bugs, each of which produced a plausible-looking symbol: an EAN add-on one module too wide, an MSI stop pattern most scanners would still have read, and an ITF-14 bearer bar drawn over the quiet zone that no scanner could read at all.
Limitations and compatibility
Postal symbologies (Royal Mail, PostNet, KIX, Japan Post), MaxiCode and the GS1 DataBar family are deliberately not here: each is carrier- or country-specific, and a symbology carried without being properly tested is worse than one that is absent. QR codes have their own generator on this site, because that format needs styling and error-correction controls this page does not offer.
Everything runs on your device, so speed depends on it rather than on a queue: a single symbol encodes and lays out in well under a millisecond, and a batch of five hundred Code 128 symbols is limited by PNG compression rather than by the barcode work, which is why it runs off the main thread and can be cancelled.
Frequently asked questions
How do I create a barcode?
Pick a format such as Code 128, EAN-13, UPC-A or Data Matrix, type the value you want to encode, and the barcode appears as you type. A hint shows the required length and allowed characters for the format, the check digit is worked out for you, and you can then set the size and colours and export PNG, SVG or PDF.
Which barcode formats are supported?
Nineteen: Code 128, GS1-128, Code 39, Code 39 Full ASCII, Code 93, Code 93 Full ASCII, EAN-13, EAN-8, UPC-A, UPC-E, the EAN-2 and EAN-5 add-ons, Interleaved 2 of 5, ITF-14, Codabar, MSI Plessey, Pharmacode, Data Matrix, GS1 DataMatrix, PDF417 and Aztec. Each is validated against its own rules before anything is drawn.
What is a check digit and does the tool add it?
A check digit is a final calculated digit that lets a scanner confirm it read the rest correctly. Enter twelve digits for an EAN-13 and the thirteenth is calculated and shown. Enter all thirteen and it is verified instead: if the digit is wrong the tool tells you which digit it should be and offers to correct it, rather than refusing the value with no explanation.
Is my data private when generating barcodes?
Yes. Every symbol is encoded and drawn on your device, so the values you type are never sent anywhere. Nothing is uploaded and nothing is stored, which matters when the value is a SKU, a patient identifier, an asset tag or an internal order number.
Can I download barcodes as PNG or SVG?
Yes, and PDF as well. PNG is a raster image at a resolution you choose up to 1200 dpi; SVG and PDF are vectors sized in millimetres, so they print at exactly the X-dimension you specified rather than at whatever size the printer decides. A batch downloads as a single ZIP, or as a sheet of labels laid out on A4 or US Letter.
What is the difference between EAN-13 and UPC-A?
EAN-13 encodes thirteen digits and is the global retail standard; UPC-A encodes twelve and is used in North America. They are the same symbol underneath — a UPC-A is an EAN-13 whose first digit is zero — which is why a scanner will often report a UPC-A as a thirteen-digit number beginning with 0. Use whichever your retailer asks for.
What is the X-dimension and why does it matter?
The X-dimension is the width of the narrowest bar, and it is the number every barcode specification is written against. EAN-13's nominal X is 0.33 mm; Code 128 for a shipping label is typically 0.25 to 0.5 mm. It decides both the finished width of the symbol and whether a scanner can resolve it, so this tool sizes symbols by X-dimension in millimetres rather than by a pixel count that means nothing on paper.
What is a quiet zone and how much do I need?
The quiet zone is the clear space either side of the bars that tells a scanner where the symbol starts and stops. It is measured in multiples of the X-dimension, not in pixels: 10X for Code 128, Code 39 and ITF, 11X on the left of an EAN-13, 1X around a Data Matrix. The tool includes each symbology's minimum automatically and will not let you go below it — cropping a barcode tight to its bars is the most common reason a printed symbol will not scan.
What is bar width reduction and when should I use it?
Bar width reduction narrows every bar by a fixed amount to compensate for ink spreading on press. Flexographic and thermal printing both widen bars slightly, which pushes a symbol out of tolerance even though the artwork was correct. Your printer will tell you the value to use, typically 0.02 to 0.08 mm. If you are printing on an office laser printer you do not need it.
Why does my ITF-14 have a frame around it?
That is the bearer bar, and it is required by the GS1 specification for the shipping-container symbol. It stops a scanner reading a partial symbol when the beam crosses the bars at a shallow angle. It sits outside the quiet zone rather than inside it, which is the detail most tools get wrong — a frame drawn over the quiet zone produces a symbol that looks right and does not read.
Can I generate a batch of barcodes at once?
Yes, with Pro. Paste a list of values, import a CSV or TXT file, or generate a sequence with a prefix, a starting number, a step and zero padding — up to 500 symbols. They download as one ZIP, or as a PDF sheet of labels on an A4 or US Letter layout, with a starting cell so a part-used sheet is not wasted.
Which format should I use for a product going into shops?
EAN-13 outside North America, UPC-A inside it, and in both cases the number has to be one your company owns — a GS1 prefix, not one you invented. For an inner carton use ITF-14 or GS1-128; for internal stock, asset tags and anything that is not going through a retail checkout, Code 128 is the right default because it encodes letters as well as digits and is denser than Code 39.
from 1,100 ratings
Rate this tool
Tap a star — it takes a second