DEV Community

Cover image for Generating QR Codes in Google Sheets
Chris Bongers
Chris Bongers

Posted on • Originally published at

Generating QR Codes in Google Sheets

Being a developer comes down to using the right tool for the right job. And sometimes, it can be a Google sheet or Excel sheet that can automate a simple task for you.

Have you ever needed to generate QR codes from a whole list of URL's for instance?

Well, Google has your back on that.
Today we'll be using Google Sheets and Google Charts to generate QR Codes!

Generating QR Codes in Google Sheets

Generating a QR code with Google Charts

Google Charts is an amazing tool that can generate several types of charts for us.
One of the charts we can generate is a QR code.

The benefit of this is that we get a dynamic endpoint where we can change the encoded QR element to be something variable.

Read more on the Google Chart QR Code

If you are following along with my article, this is the end URL we will be using.
Enter fullscreen mode Exit fullscreen mode

Where the variables we use are:

  • chs: Chart size, we defined a 200x200 square
  • cht: Chart type, in our case QR
  • chl: This is the data we want to encode

If we use that URL as an image, we get the following result.

Daily dev tips QR code

Google Sheets dynamic QR codes

Now that we know about creating QR codes let's put this into action as we generate them dynamically in Google Sheets.

Open up a new Google Sheets and fill out column A with random websites.

Then in column B, we will add the following formula.

Enter fullscreen mode Exit fullscreen mode

Then we can drag this formula down to the other cells!

Make the rows a bit bigger so you can see the image correctly.
And that's it we now have a dynamic QR generator in Google Sheets.

You can view the Google QR Sheet here.

Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on Facebook or Twitter

Top comments (2)

jonrandy profile image
Jon Randy πŸŽ–οΈ

Interesting that this still works. According to Google's documentation the API is deprecated, and was officially turned off on 18/03/2019

dailydevtips1 profile image
Chris Bongers

Oh that's funny, even if it's turned off we can use another website that can convert to QR image like