Guide

How to add a QR code in Microsoft Word

Word has no QR button, but there are three free ways. On Windows, insert a DISPLAYBARCODE field with the QR type. On any version, add the QR4Office add-in. Or make the code above, click Copy image, and paste it into your document. Pasting works in Word on Windows, Mac and the web.

01Details

02Theme

03Logo

Optional

Which way to use

  • Word for Windows, one plain link code: the DISPLAYBARCODE field. Nothing to install, and the code lives inside the document.
  • Word for Mac or the web, or anything that isn't a link: paste a code from the generator above.
  • You already use add-ins at work: QR4Office, if your IT team allows it.

Way 1: the DISPLAYBARCODE field (Windows only)

Word for Windows can draw a QR code itself, from a field code you type by hand. Microsoft lists it for Word for Microsoft 365, Word 2024, 2021, 2019 and 2016, and says it's supported only in Word for Windows desktop (Microsoft: DisplayBarcode field).

  1. Click where you want the code.
  2. Press Ctrl+F9. Word inserts a pair of grey field braces { }. Braces you type from the keyboard won't work.
  3. Inside the braces, type:
DISPLAYBARCODE "https://example.com" QR \q 3
  1. Right-click the field and choose Toggle Field Codes to show the code.

The quoted text is what goes into the code, and QR is the barcode type. \q sets the error correction from 0 to 3; Microsoft's own example uses \q 3, the highest, which makes the code a little denser but more forgiving of smudges. \s scales it, from 10 to 1000 percent. \f and \b set the foreground and background colors as a number from 0 to 0xFFFFFF, so \f 0x1D3FD6 gives a dark blue code.

Put a space before each switch. If the field shows an error message where the code should be, check those spaces first.

For a mail merge, Word has a sister field, MERGEBARCODE, that reads the data from a merge column. It's fiddly to set up; if you only need the codes as image files, the bulk QR code generator turns a CSV into a ZIP of PNGs in your browser.

Way 2: the QR4Office add-in

QR4Office is a free add-in on Microsoft AppSource that works in Word, Excel and PowerPoint. Open Insert, then Get Add-ins (or Add-ins), search for QR4Office and add it. It opens in a side panel where you type the content and insert the code, with options for color, background, size and error correction. The AppSource listing notes that the add-in can send data over the internet, which matters if your document is confidential.

Way 3: paste a code from our generator

This is the route for Word on a Mac, Word on the web, or any code that isn't a plain link, like Wi-Fi or a contact card.

  1. Make the code at the top of this page, with your colors and logo if you want them.
  2. Click Copy image, click into your document and press Ctrl+V (Cmd+V on Mac).
  3. For a printed document, click SVG (for print) instead and use Insert, then Pictures, then This Device. Word for Microsoft 365 accepts SVG files (Microsoft: edit SVG images); on older non-subscription versions, use a PNG at 2048px.

Once it's in, set text wrapping to In line with text so the code doesn't wander when you edit the paragraph above it, and resize only from a corner. A code on a printed page read at arm's length needs to be about 2.5 cm (1 inch) across; the QR code size guide covers anything larger. Print one page and scan it before you print the rest.

Written by Last updated