---
title: "Barcode in Excel – IMAGE Formula, Fonts & Free API"
description: "How to create barcodes in Excel: one IMAGE() formula with our free barcode API in Excel 365, or barcode fonts and a free bulk tool for older Excel versions."
url: https://barcodejar.com/barcode-in-excel
source: BarcodeJar (free barcode tools)
---

# How to Make Barcodes in Excel

In Excel 365, one formula turns a cell into a real, scannable barcode: `=IMAGE("https://barcodejar.com/api/barcode?type=code128&data="&ENCODEURL(A2))`. For older Excel, use a barcode font or our free bulk generator.

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

## How to create barcodes in Excel

1.  Put your codes in column A (format as Text if they are UPC/EAN numbers with leading zeros).
2.  In B2 enter `=IMAGE("https://barcodejar.com/api/barcode?type=code128&data="&ENCODEURL(A2))`.
3.  Fill the formula down and enlarge the rows so the barcodes are easy to scan.
4.  On older Excel, use a Code 39 font or paste the column into the [bulk generator](https://barcodejar.com/bulk-barcode-generator) instead.

**Quickest method (Excel 365):** if your codes are in column A, type this in B2 and fill down:

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

Each cell shows a Code 128 barcode drawn by our free [barcode API](https://barcodejar.com/barcode-api). Change `type=` to `upca`, `ean13`, `qrcode` or any other type. Older Excel versions have no IMAGE function, so use Method 2 or 3.

## Method 1: IMAGE() and the free barcode API (Excel 365)

The IMAGE function, available in Microsoft 365 versions of Excel, shows a picture from a web address inside a cell. Our [barcode API](https://barcodejar.com/barcode-api) returns a barcode image for any URL, so the two together make a barcode for every row with no add-ins.

| Barcode | Formula (value in A2) |
| --- | --- |
| Code 128 (SKUs, text) | `=IMAGE("https://barcodejar.com/api/barcode?type=code128&data="&ENCODEURL(A2))` |
| UPC-A (11 or 12 digits) | `=IMAGE("https://barcodejar.com/api/barcode?type=upca&data="&A2)` |
| EAN-13 | `=IMAGE("https://barcodejar.com/api/barcode?type=ean13&data="&A2)` |
| QR code | `=IMAGE("https://barcodejar.com/api/barcode?type=qrcode&data="&ENCODEURL(A2))` |
| No text under the bars | add `&hrt=0` to the URL |

## Tips for the IMAGE formula

-   **ENCODEURL** makes spaces and symbols safe in the URL. Plain digits (UPC, EAN) do not need it. If your Excel version lacks ENCODEURL, use `SUBSTITUTE(A2," ","%20")` for simple values.
-   **UPC and EAN numbers:** format the column as Text so Excel keeps leading zeros. The API adds the check digit to 11- or 12-digit input, and returns an error image if a full number has a wrong check digit.
-   **Bigger, sharper barcodes:** make the row taller and the column wider, or add `&scale=4` to the URL.
-   The cell value is sent to barcodejar.com to draw the image, so do not use it for confidential data.

## Method 2: barcode font (any Excel version)

1.  Install the free [Libre Barcode 39](https://fonts.google.com/specimen/Libre+Barcode+39) font and restart Excel.
2.  In B2 type `="*"&UPPER(A2)&"*"` and fill down. The asterisks are the Code 39 start and stop characters.
3.  Set column B to Libre Barcode 39 at 24–36 pt.

This only works simply for Code 39. Code 128, UPC and EAN fonts need start, check and stop characters encoded by a macro, so typing the plain value gives bars that do not scan. See the [barcode fonts guide](https://barcodejar.com/barcode-fonts).

## Method 3: Excel column to barcode images (any version)

Copy the column (or save as CSV), paste it into the [bulk barcode generator](https://barcodejar.com/bulk-barcode-generator), pick the type, and download a ZIP of PNG/SVG images or a printable PDF. Use the [label generator](https://barcodejar.com/barcode-label-generator) for Avery or thermal label sheets. The images are drawn in your browser, so nothing is uploaded.

See also: [barcode generators for every platform, product and use case](https://barcodejar.com/barcode-generator-for).

## Frequently asked questions

### Does Excel have a barcode function?

Not as such, but Excel 365's IMAGE function combined with our free [barcode API](https://barcodejar.com/barcode-api) works like one: `=IMAGE("https://barcodejar.com/api/barcode?type=code128&data="&ENCODEURL(A2))`.

### Which Excel versions have the IMAGE function?

Microsoft 365 versions of Excel (Windows, Mac and the web). Excel 2021, 2019 and older do not have it, so use a barcode font or our [bulk generator](https://barcodejar.com/bulk-barcode-generator).

### How do I make UPC barcodes from an Excel list?

Use `=IMAGE("https://barcodejar.com/api/barcode?type=upca&data="&A2)` with the column formatted as Text so leading zeros stay. Check digits are added to 11-digit input automatically.

### Why will my Excel barcode font not scan?

Usually because the start/stop characters or check digit are missing. Code 39 needs \* at both ends. Code 128 and UPC fonts need specially encoded text. The IMAGE method avoids this.

### Can I print barcode labels from Excel?

Use Word mail merge with your spreadsheet (see [barcodes in Word](https://barcodejar.com/barcode-in-word)) or our [label generator](https://barcodejar.com/barcode-label-generator), which prints straight to Avery and thermal labels.

### Is the barcode API free?

Yes, with no key or sign-up. See the [barcode API page](https://barcodejar.com/barcode-api) for all parameters, such as SVG output, scale, height and colours.

## Related free tools

[**Free Barcode API**Barcode images by URL for img tags, Google Sheets and Excel.](https://barcodejar.com/barcode-api)[**Bulk Barcode Generator**Paste a list or CSV, download hundreds as ZIP or PDF.](https://barcodejar.com/bulk-barcode-generator)[**Barcodes in Google Sheets**One IMAGE() formula with our free barcode API, or Libre Barcode fonts.](https://barcodejar.com/barcode-in-google-sheets)[**Barcode Fonts**Free Libre Barcode fonts, how to use them, and when to use images instead.](https://barcodejar.com/barcode-fonts)[**Barcodes in Word**DISPLAYBARCODE and MERGEBARCODE fields and mail-merge labels in Word.](https://barcodejar.com/barcode-in-word)[**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)
