How to Make Barcodes in Google Sheets

Put this in a cell and fill it down: =IMAGE("https://barcodejar.com/api/barcode?type=code128&data="&ENCODEURL(A2)). Every row gets a real, scannable barcode from our free API, with no add-on or font needed.

  • 100% free
  • No sign-up
  • No watermark
  • Works offline in your browser

Paste a cell value to preview the barcode your formula will produce.

Customize size, color & style
Make many

How to create barcodes in Google Sheets

  1. Put your values in column A (plain text format for numbers with leading zeros).
  2. In B2 enter =IMAGE("https://barcodejar.com/api/barcode?type=code128&data="&ENCODEURL(A2)).
  3. Drag the formula down the column and make the rows taller so the barcodes are readable.
  4. Change type= for UPC, EAN, QR or any other type, and scan one with our online scanner to check.

Quickest method: with your codes in column A, enter this in B2 and drag it down:

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

Change type=code128 to upca, ean13, qrcode or any type listed on the barcode API page.

Method 1: IMAGE() with the free barcode API

Google Sheets' IMAGE function displays a picture from a URL in a cell. Our barcode API returns a barcode image for whatever you pass in data, so one formula covers the whole column.

BarcodeFormula (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 (URLs, text)=IMAGE("https://barcodejar.com/api/barcode?type=qrcode&data="&ENCODEURL(A2))
Fixed size, 60 × 200 px=IMAGE("https://barcodejar.com/api/barcode?type=code128&data="&ENCODEURL(A2), 4, 60, 200)

Tips for the IMAGE formula

  • ENCODEURL keeps spaces, & and other symbols from breaking the URL. Plain digits do not need it.
  • Leading zeros: format UPC/EAN columns as plain text (Format → Number → Plain text) so Sheets does not drop the zeros.
  • Size: by default the image fits the cell. Make rows taller, use mode 4 with a height and width as shown above, or add &scale=4 for a higher-resolution image.
  • Options: add &hrt=0 to hide the text under the bars, &height=10 for taller bars, or &fg=1a1a1a&bg=ffffff for colours.
  • Cell values are sent to barcodejar.com to draw the image, so avoid confidential data.

Method 2: Libre Barcode fonts

Open the font menu, choose More fonts and add Libre Barcode 39. Then use ="*"&UPPER(A2)&"*" in a column with that font at 24 pt or more. Only Code 39 works this simply; the Libre Code 128 and EAN-13 fonts need specially encoded text, so plain values will not scan. See the barcode fonts guide.

Printing barcodes from Sheets

IMAGE() barcodes print with the sheet. For labels, download the sheet as CSV and paste the column into the label generator (Avery and thermal sizes), or the bulk generator for a ZIP of PNG/SVG files.

See also: barcode generators for every platform, product and use case.

Frequently asked questions

Can Google Sheets generate barcodes?

Yes, with the IMAGE function and a barcode API: =IMAGE("https://barcodejar.com/api/barcode?type=code128&data="&ENCODEURL(A2)). Our API is free and needs no key.

How do I make a QR code in Google Sheets?

Use =IMAGE("https://barcodejar.com/api/barcode?type=qrcode&data="&ENCODEURL(A2)). ENCODEURL matters here because URLs and text contain characters like & and ?.

How do I make UPC barcodes in Google Sheets?

Use type=upca with your 11 or 12-digit numbers, stored as plain text so leading zeros stay. The check digit is added to 11-digit input.

Why does my barcode show an error image?

The data is not valid for that type, for example letters in a UPC or a wrong check digit. Open the URL in a browser to see the error message.

Is there a limit on the barcode API?

It is free with no key. Please keep usage reasonable; see the barcode API page for details and all parameters.

Can I use a barcode font instead?

Yes, Libre Barcode 39 from the More fonts menu works for Code 39 with asterisks around the value. Other barcode fonts need encoding.

Related free tools