Create QR Codes in Google Sheets Using Formulas

Video how to make a qr code for a google sheet

Welcome to this tutorial where I will show you how to create QR codes in Google Sheets using formulas. I will also teach you how to transfer them to Google Docs and Google Slides using Apps Script.

QR Codes in Google Sheets

QR codes are a type of matrix barcode. They are machine-readable optical labels that provide information about products or items. Nowadays, they are everywhere, from restaurant menus to packaging labels.

In this article, we will focus on creating fully functional QR codes in Google Sheets.

QR Codes in Google Sheets

Creating QR Codes in Google Sheets

To create QR codes, we use a QR code API to generate the codes. Then, we display these QR codes in Google Sheets using the IMAGE function.

Let’s take an example. Suppose we have information in cell A1. The first step is to encode the data for the API using the ENCODEURL function. Encoding ensures that the data can be used in the URL query string when we call the API. For example, spaces are not allowed in URLs, so the ENCODEURL function replaces them with a special code (%20 in this case). Anyway, if you have the ENCODEURL function, it takes care of that for you.

Next, we add the QR code generation request for the API, which will create the QR code:

=IMAGE("https://api.qrserver.com/v1/create-qr-code/?size=150x150&data="&ENCODEURL(A1))

If you click on the URL generated by this formula, the QR code will open in a new tab of your browser. Now, we need to display the QR code in the sheet.

To do that, we wrap the formula with the IMAGE function:

=IMAGE(IMAGE("https://api.qrserver.com/v1/create-qr-code/?size=150x150&data="&ENCODEURL(A1)))

And voilà! Our QR code in a Google sheet!

QR Codes in Google Sheets

Now, we can scan this QR code with our phone or a QR code reader to quickly access this data:

QR Codes in Google Sheets

QR Code Template

Click here to open a read-only copy >>

Feel free to make a copy: File > Make a copy…

If you are unable to access the template, it may be due to your organization’s settings in Google Workspace. In that case, right-click on the link to open it in a private browsing window.

See Also

Create Barcodes in Google Sheets in 2 Easy Steps

My friend, Amit Agarwal, has written a tutorial on creating dynamic QR codes to collect UPI payments using custom functions in Google Sheets.

And there you have it! Now you know how to create QR codes in Google Sheets using formulas. Have fun and visit Crawlan.com for more tips and tutorials!

Related posts