Choose language

QR codes in Google Sheets and Excel with one formula

Links or texts in column A, a QR code for every row in column B. Free, without an API key and without an add-on: the formula loads each picture straight from the EventPics QR code API.

fx=IMAGE("https://event.pics/qr.png?data="&ENCODEURL(A2))
AB
1LinkQR code
2https://event.picsQR code: https://event.pics
3https://example.com/menuQR code: https://example.com/menu
4Table 1QR code: Table 1
What it looks like in the sheet: one formula, copied down.

The formula for Google Sheets

Put your links or texts in column A, starting in A2. Then type this into B2:

=IMAGE("https://event.pics/qr.png?data="&ENCODEURL(A2))
  1. Press Enter. The first time, Google Sheets shows a yellow bar about external data: allow access once for this sheet.
  2. Drag the small square at the bottom right corner of B2 down to your last row. Every row gets its own code.
  3. Make the rows taller, for example 120 pixels (right click on the row numbers), so the codes are big enough to scan.

ENCODEURL makes sure that links with ?, & or spaces arrive in full.

Heart, colours and size

Options go in front of data=, and data= always comes last. A heart shaped QR code:

=IMAGE("https://event.pics/qr.png?design=heart&data="&ENCODEURL(A2))
design=hearta real heart shaped QR code, readable thanks to the strongest error correction
fg=c1272dcolour of the code, as a hex value without #
bg=transparentno background, for coloured paper or a coloured cell
size=1000picture size in pixels, 100 to 3000. The cell scales it down, a larger picture prints sharper
margin=2empty border around the code in squares, 4 by default

Several options are joined with &:

=IMAGE("https://event.pics/qr.png?design=heart&fg=c1272d&size=1000&data="&ENCODEURL(A2))

All options are listed in the QR code API documentation.

Excel

Excel has the same IMAGE function in Microsoft 365 and Excel 2024. In an English Excel the formula is identical to Google Sheets:

=IMAGE("https://event.pics/qr.png?data="&ENCODEURL(A2))

ENCODEURL only exists in Excel for Windows. On a Mac and in Excel for the web, leave it out:

=IMAGE("https://event.pics/qr.png?data="&A2)

That works for plain links. Texts with spaces, & or # need ENCODEURL, so use Google Sheets or Excel for Windows for those.

Excel 2021 and older have no IMAGE function. There, create the codes in the QR code generator and insert them as pictures.

What people use it for

Frequently asked questions

Is it really free?

Yes. No key, no sign up and no fixed daily limit. The same input always gives the same picture, which stays cached, so large sheets load quickly. A rate limit only stops automated mass requests.

Do the QR codes expire?

No. The code contains your link directly, there is no redirect in between. Printed codes keep working even if the sheet is deleted.

Is my data stored?

No. We do not log query strings and do not keep what you encode.

Does it work in LibreOffice or Apple Numbers?

Neither has a formula that loads pictures from a web address. Create the codes in the QR code generator and insert them as pictures.

Can I print the codes?

Yes, print the sheet as usual. Make the rows taller for larger codes and add size=1000 so the picture stays sharp.

Prefer to click? The QR code generator does the same with a live preview, your logo and a download as PNG or SVG.

Open the QR code generator