Barcode generator
Create Code 128, EAN, UPC, Data Matrix, PDF417 and Aztec barcodes — PNG or SVG, in your browser.
Runs 100% in your browserHow to generate a barcode
- Pick a symbology. Choose the barcode type you need.
- Enter the value. Type the data to encode; the preview updates live.
- Download. Save a PNG for labels or an SVG for print artwork.
How a barcode encodes data
A linear (1-D) barcode is a row of parallel bars and spaces of varying width. A scanner sweeps a beam or camera across it, measures the relative widths of light and dark, and maps that pattern back to characters using the rules of a particular symbology. The blank margin on each side — the quiet zone — is not decoration: it tells the reader where the code starts and stops, and too little of it is the single most common reason a freshly printed label refuses to scan. Most retail symbologies also carry a check digit, a final number computed from the others so the scanner can reject a misread instead of charging for the wrong product. Because all of that structure lives in the geometry of the bars, a barcode needs no database to be read — the value is in the print itself; the database only maps that value to a price or a shipment.
Picking the right symbology
The format is dictated by where the code will be used. EAN-13 and UPC-A are the fixed-length numeric codes printed on retail products — they require an exact digit count (12–13 and 11–12 respectively) because the last digit is a computed check, which is why this tool reports an error the moment the count is wrong rather than printing something a till will reject. Code 128 is the workhorse for shipping and warehouse labels: it encodes the full ASCII set at high density, so any order number or SKU fits. Code 39 is older and bulkier but still common on ID badges and industrial parts. ITF-14 goes on shipping cartons. When you need to pack far more into a small footprint, switch to a 2-D matrix code — Data Matrix for tiny electronics and medical parts, PDF417 for driving licences and boarding passes, Aztec for rail and event tickets.
Printing, privacy and related tools
Download a PNG for a quick label or an SVG for artwork that will be printed large or sent to a press — the SVG is vector, so the bar edges stay sharp at any size, and crisp edges are exactly what a scanner needs. Keep the code dark-on-light, leave the quiet zone intact, and test at the real printed size before a long run. Everything here is rendered locally with the open-source BWIPP engine for spec-accurate output, so the value you encode is never uploaded. For a camera-friendly code that holds a link, Wi-Fi login or contact card, use the QR code generator; to pull the value back out of an existing code, the QR code reader decodes from a photo or screenshot.
Frequently asked questions
- Common retail and logistics 1-D formats — Code 128, Code 39, EAN-13, EAN-8, UPC-A, UPC-E and ITF-14 — plus 2-D codes Data Matrix, PDF417 and Aztec. Each renders to a scannable image.
- Use EAN-13 or UPC-A for retail products, Code 128 for shipping and internal labels, ITF-14 for cartons, and Data Matrix or PDF417 where you need to pack more data into a small space.
- Yes. Everything is rendered in your browser with an open-source barcode engine; the value you encode is never uploaded.
- Fixed-length retail formats require an exact digit count (EAN-13 needs 12 or 13 digits, UPC-A needs 11 or 12). The tool validates and reports what is expected.