---
title: "Free Barcode API – Barcode Images by URL (No Key)"
description: "Free barcode image API. Generate Code 128, UPC, EAN, QR and 100+ barcode types by URL as PNG or SVG. Works in img tags, Google Sheets and Excel. No key needed."
url: https://barcodejar.com/barcode-api
source: BarcodeJar (free barcode tools)
---

# 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.

_Interactive tool: open https://barcodejar.com/barcode-api to use it in your browser. It is free with no sign-up._

## API reference

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

| Parameter | Default | Description |
| --- | --- | --- |
| `data` | required | The value to encode. URL-encode it. |
| `type` | `code128` | Barcode type: `code128`, `upca`, `ean13`, `qrcode`, `datamatrix`, `gs1-128` and more. See [all types](https://barcodejar.com/barcode-types). |
| `format` | `png` | `png` or `svg`. |
| `scale` | 3 | Pixels per module, 1–10. |
| `height` | auto | Bar height in millimetres (1D barcodes). |
| `hrt` | 1 | `0` hides the human-readable text. |
| `fg` / `bg` | 000000 / ffffff | Hex colours without `#`. `bg=transparent` removes the background. |
| `padding` | 8 | Quiet zone in modules, 0–50. |
| `rotate` | N | `N`, `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](https://github.com/metafloor/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](https://barcodejar.com/bulk-barcode-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

[**Bulk Barcode Generator**Paste a list or CSV, download hundreds as ZIP or PDF.](https://barcodejar.com/bulk-barcode-generator)[**Barcode Label Generator**Print barcodes on Avery and other label sheets as PDF.](https://barcodejar.com/barcode-label-generator)[![Code 128 Generator example](/thumbs/code128.svg)**Code 128 Generator**Create Code 128 barcodes free. PNG, SVG, PDF.](https://barcodejar.com/code-128-barcode-generator)[**QR Code Generator**Free static QR codes with colors and logo. No sign-up.](https://barcodejar.com/qr-code-generator)[![UPC-A Generator example](/thumbs/upca.svg)**UPC-A Generator**Create UPC-A barcodes free. PNG, SVG, PDF.](https://barcodejar.com/upc-barcode-generator)[**Online Barcode Scanner**Scan any barcode with your phone or webcam camera.](https://barcodejar.com/barcode-scanner)
