Free Barcode API

Generate barcode images from a URL. Put it in an tag, a Google Sheets =IMAGE() formula, Excel, Notion or an email template. No API key, no sign-up, PNG or SVG.

  • Free
  • No API key
  • PNG & SVG
  • Edge cached
Barcode preview from the API

API reference

GET https://barcodejar.com/api/barcode returns an image. Use /api/barcode.svg for SVG.

ParameterDefaultDescription
datarequiredThe value to encode. URL-encode it.
typecode128Barcode type: code128, upca, ean13, qrcode, datamatrix, gs1-128 and more. See all types.
formatpngpng or svg.
scale3Pixels per module, 1–10.
heightautoBar height in millimetres (1D barcodes).
hrt10 hides the human-readable text.
fg / bg000000 / ffffffHex colours without #. bg=transparent removes the background.
padding8Quiet zone in modules, 0–50.
rotateNN, R (90°), I (180°), L (270°).

Examples

HTML

<img src="https://barcodejar.com/api/barcode?type=upca&data=012345678905" alt="UPC barcode 012345678905">

Google Sheets

=IMAGE("https://barcodejar.com/api/barcode?type=code128&data="&ENCODEURL(A2))

Markdown

![QR code](https://barcodejar.com/api/barcode?type=qrcode&data=https%3A%2F%2Fbarcodejar.com)

Please link to BarcodeJar if the API is useful to you. It keeps the service free.

Frequently asked questions

Is the barcode API really free?

Yes. There is no key, no sign-up and no watermark. Images are cached at the edge, so repeat requests are fast. Please be reasonable: if you need millions of images a day, generate them yourself with the open-source bwip-js library, which this API uses.

How do I make barcodes in Google Sheets?

Use the IMAGE function with the API URL and your cell value: =IMAGE("https://barcodejar.com/api/barcode?type=code128&data="&ENCODEURL(A2)). Fill it down the column to make a barcode for every row.

How do I make barcodes in Excel?

Excel 365 has an IMAGE function that works the same way: =IMAGE("https://barcodejar.com/api/barcode?type=code128&data="&ENCODEURL(A2)). For older Excel versions, use our bulk generator and insert the images.

Which barcode types are supported?

All 106 types that BarcodeJar supports, including Code 128, UPC-A, EAN-13, QR Code, Data Matrix, PDF417, GS1-128 and ITF-14. Pass the type with the type parameter, for example type=qrcode.

Can I get an SVG instead of a PNG?

Yes. Add &format=svg, or call /api/barcode.svg. SVG is a vector format, so it stays sharp at any print size.

What happens if my data is invalid?

The API returns HTTP 400 with a JSON body explaining the problem, for example {"error":"UPC-A must be 11 or 12 digits"}.

Related free tools