Back to Tools

Barcode Generator

Generate high-resolution barcodes for products, inventory, and logistics

Data to Encode
Barcode Format
Include Text?
CODE128 Encoding Type
SVG / Vector Format Quality

Generate a scannable barcode from your own data

Whether you are labelling shelves, tagging inventory, printing a shipping reference or making a prop for a project, you need a barcode that a scanner can read. This generator draws one from whatever you type, in five common formats, and lets you save it as an image. It is meant for short identifiers and product numbers rather than long text.

Making a barcode

  1. Type your number or text into the Data to Encode box.
  2. Pick a Barcode Format: CODE128 (Standard), EAN-13 (Product), UPC (Retail), CODE39 or ITF-14.
  3. Set Include Text? to Yes if you want the value printed under the bars, or No for bars only.
  4. Click Generate Barcode. The barcode is drawn on a white panel and the Encoding Type box shows the format you used.
  5. Press Download Barcode to save a PNG file named barcode.png, rendered at double size for a sharper print.

Choosing the right format

  • CODE128 is the most flexible and accepts letters, digits and common symbols. It is a good default for internal labels and shipping references.
  • EAN-13 and UPC are for retail products and accept digits only, normally 13 and 12 digits respectively, including the check digit.
  • CODE39 handles capital letters, digits and a few symbols and is common in industrial and government use.
  • ITF-14 is used for cartons and cases and expects a numeric value of the right length.

When it goes wrong

If the data does not fit the chosen format, for example letters in an EAN-13 or a number of the wrong length, an alert asks you to check that the data matches the format requirements. Switch to CODE128 if you need free-form text. Note that a valid-looking EAN or UPC image does not mean the number is registered to you. Real retail codes come from a GS1 licence, so use these only for testing, demos or internal use unless you own the number.

Printing tips

Print at a size that keeps the bars crisp, leave a quiet margin of white space on both sides and always test with a real scanner or a phone app before printing a whole batch. The bars are drawn with fixed thickness and height, and there are no colour or size controls. The barcode is generated by the JsBarcode library, loaded from a CDN, directly in your browser.

Related Articles


Related Tools








Frequently Asked Questions

Which barcode formats are available?
CODE128, EAN-13, UPC, CODE39 and ITF-14. CODE128 is the most flexible and accepts letters and symbols, while EAN-13, UPC and ITF-14 are numeric formats with strict length rules, and CODE39 supports capital letters and digits.
Why do I get an error when generating a barcode?
The data probably does not match the chosen format, such as letters in an EAN-13 or UPC code, or a number with the wrong length or check digit. Correct the value or switch to CODE128, which accepts general text.
What file do I get when I download?
A PNG image named barcode.png with a white background, drawn at twice the on-screen size for sharper printing. The barcode is shown as vector graphics on the page, but the download button saves it as a raster PNG.
Can I use the EAN or UPC codes to sell products?
Not on their own. Retail numbers are allocated through GS1 or a licensed reseller, and this tool only draws whatever number you give it. Use generated codes for testing, internal tracking, or mock-ups unless you own the number.
Can I hide the number below the barcode?
Yes. Set Include Text? to No before pressing Generate Barcode and only the bars will be drawn. Choose Yes to print the encoded value beneath the bars, which is helpful when a person may need to type the code manually.
Support Chat
We typically reply within minutes

Hello! 👋 Before we start, please tell us your name.