The short answer
| Your situation | Best method | Works in |
|---|---|---|
| A live code in each cell, and the data isn't private | IMAGE formula | Microsoft 365 |
| Many codes as image files, or private data | Bulk QR code generator | Any Excel version |
| Printed labels, cards or letters with a code each | Word mail merge | Word for Windows |
| Just one code | Make it and insert the picture | Any version |
Method 1: the IMAGE formula
Newer versions of Excel have an IMAGE function that can load a picture from a web address. A QR code service can turn your cell's text into that picture. If your link is in cell A2, a commonly used formula looks like this:
=IMAGE("https://api.qrserver.com/v1/create-qr-code/?size=300x300&data="&ENCODEURL(A2))
Copy it down the column, then increase the row height so the codes are large enough to see. ENCODEURL matters: without it, links with & or spaces break. It isn't available in every Excel edition, so if it causes an error, use A2 alone for simple links with no special characters.
Check three things first.
- Your data leaves your computer. Every cell value is sent to a third-party service. Don't use this for passwords, personal details or anything confidential.
- The code depends on that service. The picture is fetched from the web, so the sheet needs internet access, and it breaks if the service changes or goes offline. Pasting the cell as a picture keeps a copy.
- Your version must have IMAGE. Excel 2019 and earlier don't have it, and you'll see a #NAME? error. A #CONNECT! error means Excel couldn't reach the service.
Method 2: make all the codes from your sheet, privately
This needs no formula, and works with any Excel version.
- Open the bulk QR code generator and upload your .xlsx file. You can also paste a column.
- Choose the column with the content, and another for the file names.
- Add a logo and colors if you want. One design applies to every code.
- Download a ZIP with up to 5,000 PNG or SVG files.
The file is read in your browser and nothing is uploaded, so it suits private data like employee details or serial numbers. The codes are static, so they never depend on a service.
To place the codes back in Excel, use Insert → Pictures → This Device and select the files. Use Place in Cell in Microsoft 365 if you want each to stay in its row.
Method 3: mail merge in Word, for printing
For ID cards, labels or letters, Word for Windows can draw a code from each Excel row. Set up a normal mail merge from your sheet, then press Ctrl + F9 to insert a field like this one:
{ DISPLAYBARCODE "{ MERGEFIELD Link }" QR \q 3 }
Each pair of braces must be made with Ctrl + F9, not typed. Press Alt + F9 to switch between the field code and its result. Our guide to QR codes in Word explains the options.
Barcodes as well
For retail or stock barcodes, the barcode generator calculates check digits for EAN-13 and UPC, and the bulk generator handles QR codes. Fonts that imitate QR codes in Excel usually don't scan, so avoid them.
Common problems
The code is too small to scan. Enlarge the row and column, or print at 2 cm or wider. See QR code size for printing.
It scans but opens the wrong page. The cell may hold extra spaces. Wrap the reference in TRIM, for example ENCODEURL(TRIM(A2)).
Too much data. The more text in a cell, the denser the code. Use a short link where you can, and print larger.
Codes changed after sorting. Pictures don't always sort with cells. Use Place in Cell, or keep the image file names matched to a column.
Example: a code for each product in a stock sheet
Suppose column A holds a product code and column B a product name. In a new column, build the link each code should open, for example ="https://yourshop.com/p/"&A2. Fill it down, then copy the column and use Paste Values so the links are plain text. Upload the sheet to the bulk generator, choose that column for the content and the product name for the file name, and you get one correctly named image for each product. Before printing them all, scan the first and last, because a mistake in the formula affects every row.
Test before you rely on it
Scan a few rows from the top, middle and bottom of the sheet with a phone. Test on paper too if you will print them. The scannability checker gives a score from an image.
Frequently asked questions
Can Excel generate QR codes without an add-in?
Yes. Microsoft 365 can use the IMAGE function with an online QR service, and any version can use codes made from your sheet with a bulk generator.
What is the Excel formula for a QR code?
A common one is =IMAGE("https://api.qrserver.com/v1/create-qr-code/?size=300x300&data="&ENCODEURL(A2)). It sends each cell value to that third-party service, so don't use it for private data.
Why does the IMAGE formula show #NAME?
Your Excel version doesn't have the IMAGE function. It isn't in Excel 2019 or earlier. Use the bulk method instead.
Can I generate QR codes from Excel in bulk?
Yes. Upload your .xlsx file to the bulk QR code generator and download up to 5,000 codes as a ZIP. The file stays in your browser.
Do QR codes made in Excel expire?
A code saved as an image holds its content directly, so it doesn't expire. A formula code needs to load its picture from the service each time it is displayed.
Can I use a QR code font in Excel?
Generally it isn't reliable. QR codes need error correction data that a font alone doesn't produce, so use an image instead.