Barcode Generator
Create barcodes in the most widely used formats — CODE128, EAN-13, UPC-A, and CODE39 — directly in your browser. The tool validates the content according to each format's rules and lets you download the result as SVG or PNG.
How it works
- Choose the barcode format you need.
- Enter the content: free text for CODE128 or CODE39, or digits for EAN-13 and UPC-A.
- The tool automatically validates that the value follows the chosen format's rules (length, character type).
- The barcode renders instantly as SVG using the jsbarcode library.
- Download the result as an SVG (vector) or PNG (raster) file.
Use cases
- Generate product labels for inventory or point-of-sale systems.
- Create barcodes for catalogs, packaging, or printed materials.
- Test barcode scanners or inventory management systems.
- Produce vector barcodes (SVG) ready to drop into print designs.
Use cases
- Generate product labels for inventory or point-of-sale systems.
- Create barcodes for catalogs, packaging, or printed materials.
- Test barcode scanners or inventory management systems.
- Produce vector barcodes (SVG) ready to drop into print designs.
Common mistakes
- Entering an EAN-13 or UPC-A code with the wrong number of digits, for example mixing in letters or spaces.These formats only accept digits and an exact length (12 or 13 for EAN-13, 11 or 12 for UPC-A); the tool validates this automatically and shows an error explaining what to fix.
- Calculating the EAN-13 or UPC-A check digit by hand and getting it wrong.There's no need to calculate it manually: if you enter the code without the check digit (12 digits for EAN-13, 11 for UPC-A), the tool calculates it automatically.
- Downloading the barcode as a small PNG and then enlarging it to print it big.PNG is a fixed-size raster image and loses sharpness when enlarged. For printing at different sizes, download the SVG instead, which is vector-based and scales without losing quality.
Frequently asked questions
CODE128 is the best option for free text, since it supports letters, numbers, and most ASCII symbols without strict length restrictions.
Both formats include a check digit calculated from the rest of the digits. If you enter the code without the check digit (12 digits for EAN-13, 11 for UPC-A), the tool calculates it automatically; if you include it, it must be valid.
SVG is a vector format that scales without losing quality, ideal for professional printing. PNG is a raster image with a fixed size, more practical for sharing or inserting directly into documents.
No. The CODE39 standard only defines uppercase characters, numbers, and a limited set of symbols, so the tool automatically converts entered text to uppercase.
Alternatives
Libraries like jsbarcode (the same one this tool uses) or bwip-js let you generate barcodes programmatically inside an inventory or point-of-sale system. This tool is convenient for quickly generating one or a few codes, with format validation built in, and no code to write.