Cover illustration for the article “How to Add a QR Code in Google Docs, Sheets and Slides”
Tutorials

How to Add a QR Code in Google Docs, Sheets and Slides

7 min read
Create a QR code

As of November 2026, Google Docs, Sheets and Slides have no built-in QR code tool. In Sheets, the IMAGE function can show a code drawn by a third-party QR API, one per row, from a formula you fill down. In Docs and Slides, you insert a QR image made elsewhere or install a Marketplace add-on. The old Google Chart API formula that most tutorials still copy no longer works.

Why the old Google Chart formula shows a blank cell

The formula most people find first points at chart.googleapis.com with a parameter cht=qr. That endpoint belonged to Google Image Charts, a service Google deprecated in 2012. On 10 February 2019 the Google Chart API group announced that Image Charts "will be turned off on March 14, 2019". It kept running anyway, until a 5 January 2024 post in the Google Visualization API group said the API "was deprecated in 2012 and is finally, 12 years later, being turned off".

As of 21 November 2026, a request to the old QR address returns an HTTP 404 error, so any sheet still built on it renders an empty cell. Google never replaced it; a 2018 reply in the same group put it flatly: "Google Charts does not support QR codes". The fix is to swap the endpoint.

The Google Sheets QR formula that works in 2026

The working pattern is IMAGE wrapped around a QR API request, with the cell's text URL-encoded. With the link in A2, this formula uses the free goQR.me API:

=IMAGE("https://api.qrserver.com/v1/create-qr-code/?size=300x300&qzone=4&ecc=M&data="&ENCODEURL(A2))

Each part has a job. ENCODEURL, in Google's words, "encodes text so it can be used in the query string of a URL". Without it, a link that contains its own question mark, ampersand or hash sign gets split, and the API encodes only the first part of your address.

The qzone=4 parameter matters more than it looks. The goQR.me API documentation lists qzone as the quiet zone "in modules", with a default of "0 (=no quiet zone)". ISO/IEC 18004 asks for 4 modules of blank border. Our quiet zone guide explains why the border is part of the symbol. The ecc parameter sets error correction, which defaults to L (about 7% recoverable); M (about 15%) is a sensible choice for codes that may be printed. The same documentation caps PNG output at 1000x1000 pixels.

Google's IMAGE function help page defines four display modes. Mode 1, the default, fits the image inside the cell and keeps its proportions, which is what a QR code needs. Mode 2 stretches the image to fill the cell, so a wide cell squashes the square into a rectangle and the finder patterns stop reading as squares. Mode 4 takes a height and width in pixels. No mode resizes the cell, so set row height and column width first. Fill the formula down and every row gets its own code.

MethodWorks inWhere your data goesFit for printOne code per row
IMAGE plus a QR APISheetsThe API operator's serverUp to the API's pixel capYes
Insert > Image (PNG made elsewhere)Docs, Sheets, SlidesWherever you generated itAs good as the fileNo
Marketplace add-onDocs, Sheets, SlidesThe add-on developerVaries by add-onDepends
Chrome "Create QR code" on the open fileAny page you have openMade by Chrome itselfPNG download onlyNo

The limits of a QR code drawn by a formula

A formula-drawn code is a live request, not a stored picture. If the API changes its address or goes offline, every cell goes blank at once, which is exactly what happened to the Chart API. Google's IMAGE help also lists three restrictions that trip people up as of November 2026. "SVG file format isn't supported." You "can only use URLs that aren't hosted at drive.google.com", so you cannot store QR files in Drive and pull them in by formula. And the URL may not use a volatile function such as NOW or RAND.

To freeze a code so the sheet no longer depends on the API, download the image and insert it as a picture. On desktop, select a cell, open Insert, choose Image, then pick in-cell or over-cells placement. Google's Sheets help states that inserted images must be "under 50 MB in .png, .jpg, or .gif format", that SVG is not supported here either, and that a cell holding an image cannot also hold text. An image floating over the grid can be moved into a cell from its More menu with "Put image in selected cell".

None of this produces print-grade artwork. A 1000-pixel PNG is fine for a handout, but a poster or a label printer wants a vector file, and our guide to QR code SVG and EPS files explains which format a print shop will ask for.

Docs and Slides: insert an image or install an add-on

Docs and Slides have no formula layer, so the code has to arrive as a picture. In both apps, open Insert, then Image, and choose Upload from computer, Drive & Photos or By URL, according to Google's Docs Editors Help. Generate a large PNG, at least 1000 pixels across, and scale it down on the page. Shrinking keeps the module edges sharp, while enlarging a small screenshot blurs them.

If the code should open the document itself, Chrome can make one from the open tab. On desktop, the path in Chrome Help is More, then "Cast, save, and share", then "Create QR code". It encodes whatever sits in the address bar, so check the file's sharing settings before anyone scans it. The Google QR code generator page covers what Chrome's built-in code can and cannot do.

Add-ons live under Extensions, then Add-ons, then Get add-ons. Google's help warns that "a message will appear requesting access to data that the add-on needs to work", and that wording deserves a slow read. On a work or school account the store may look empty. Google Workspace admins can set Marketplace access to "Allow users to install and run allowlisted apps from the Marketplace", and then only approved add-ons appear.

What a QR API or add-on learns about your data

Every cell you encode travels to the API operator as part of the request URL, because the data has to reach their server to be drawn. That matters for Wi-Fi passwords, contact cards or ticket numbers, far less for public links. goQR.me states on its privacy page that it does not "store or log QR code contents", that its logs record that a request happened, and that the image is deleted "~30 seconds after delivery". Its API page adds that it records each request's referrer and IP address. Other APIs publish other policies, or none, so read the one you pick before pointing a column of customer data at it. If the cells hold personal data, check with whoever handles data protection in your organisation, particularly in the EU, where GDPR applies.

Add-ons raise a different question, because they ask for access to your files, not just one string. Google's account help says linked apps "can only access the data and services that you authorize them to", and that revoking access later does not erase what they already hold: "You may need to contact the developer of the app to request that they delete the data they already have." The QR code API comparison lists what else to check before trusting a provider with production data.

Codes from a spreadsheet cannot be edited later

Every method above produces a static QR code, which means the link is written into the pattern itself. A typo in column A, a renamed landing page or a moved file means reprinting everything that carries the code. For product labels, signage or anything printed in volume, a dynamic QR code encodes a short redirect instead, so the destination can change without touching the print. In QRolling you can create and style a code free with no login, and downloading needs an account that starts a 7-day trial with no card. If your data lives in Microsoft's spreadsheet rather than Google's, the Excel QR code guide covers the options there.

Frequently asked questions

Why does the QR code in my cell look squashed or cut off? The IMAGE formula is probably using mode 2, which stretches to fill the cell, or mode 3, which shows the original size and can crop. Remove the mode argument to return to mode 1, then make the row taller.

Does the code update when I change the cell it reads from? Yes. The formula rebuilds the request whenever the referenced cell changes, so a new link in A2 draws a new code. An image you inserted with Insert > Image does not update, because it is a fixed picture.

Which error correction level should I choose? L is enough for a clean code shown on screens. M or Q suits print that may get scuffed. H, about 30% recoverable, is the usual choice when a logo will cover part of the code, at the cost of a denser pattern.

Share this article