logo
search
list

Table of Content

Two Ways to Generate a QR Code in Word
Method 1: Create a QR Code Directly with DisplayBarcode
How to Resize or Customize a QR Code in Word
Method 2: Generate a QR Code with a Word Add-in
Need to Create Multiple QR Codes in Word?
What If Your Version of Word Cannot Generate a QR Code?
How to Make a QR Code Created in Word Scan Correctly
Creating a QR Code in Word vs. Creating One for a Word File
Troubleshooting QR Code Generation in Word
Frequently Asked Questions
No Microsoft Word? Finish the QR Code Document in WPS Writer
Official References

How to Create a QR Code in Word: 2 Easy Methods

Posted by Algirdas Jasaitis

calendar

2026-07-20

views

902

likes

6

Fastest method for Word on Windows

Generate a QR code directly in Word with the DisplayBarcode field.

  1. Press Ctrl + F9 to create Word field braces.
  2. Type the command below between the braces.

Type this in the Word field—not on this webpage:

DisplayBarcode "https://www.example.com" QR \q 3
  1. Right-click the field, choose Toggle Field Codes, and Word generates the QR code.
Important: Do not type the outer { } braces manually. Word must create them when you press Ctrl + F9.
QR code generated directly in a Microsoft Word document
QR code generated directly in a Microsoft Word document
100% secure

Using Word on Mac or Word Online? Use a compatible QR code add-in. If an add-in is unavailable, create the code with an online generator and add the downloaded image as a fallback.

Two Ways to Generate a QR Code in Word

Method Best for What happens
DisplayBarcode field Word for Windows users who need a simple URL or text QR code Word generates the QR code from a field command
Word QR code add-in Users who prefer a visual panel instead of a field command The add-in generates and places the QR code inside Word

Generating a code online and inserting the downloaded image is a useful fallback, but it is not the primary method covered by this guide because the QR code is created outside Word.

Method 1: Create a QR Code Directly with DisplayBarcode

The DisplayBarcode field is the most direct way to generate a basic QR code inside Word for Windows. You can use it for a webpage URL or a short piece of text without installing a separate tool.

Step 1: Place the Cursor

Open the Word document and click where you want the generated QR code to appear. Leave enough space around it so the code will not overlap nearby text.

Step 2: Create a Word Field

Press Ctrl + F9. Word will create a pair of special field braces. On keyboards that use the function keys for media controls, you may need to press Ctrl + Fn + F9.

Word field braces created by pressing Ctrl and F9
Word field braces created by pressing Ctrl and F9

Step 3: Enter the QR Code Command

Type the following command between the braces:

DisplayBarcode "https://www.example.com" QR \q 3

Replace the example URL with the link you want the QR code to open. The complete field will appear as:

{ DisplayBarcode "https://www.example.com" QR \q 3 }
  • DisplayBarcode tells Word to generate a barcode.
  • The text inside quotation marks is the encoded destination.
  • QR selects the QR code format.
  • \q 3 applies a QR error-correction setting.
DisplayBarcode QR command typed inside a Word field
DisplayBarcode QR command typed inside a Word field

Step 4: Generate the QR Code

Right-click the field and select Toggle Field Codes. Word will replace the command with a generated QR code.

Toggle Field Codes command selected in Microsoft Word
Toggle Field Codes command selected in Microsoft Word

Word will replace the field command with the QR code shown in the quick answer at the top of this guide.

Step 5: Test the Generated Code

Scan the code with a phone before sharing or printing the document. Confirm that it opens the exact URL or content you entered.

How to Change the QR Code

  1. Right-click the generated QR code.
  2. Select Toggle Field Codes.
  3. Change the URL or text inside the quotation marks.
  4. Select the field and press F9 to update it.
  5. Toggle the field again and test the regenerated code.

How to Resize or Customize a QR Code in Word

You can add optional switches to the DisplayBarcode field when the default QR code is too small or you need a different correction level or color.

For example, this command generates the same URL at 150% scale:

DisplayBarcode "https://www.example.com" QR \q 3 \s 150
SwitchWhat it changesValid value or example
\sScales the QR code10–1000, entered as a whole percentage
\qSets QR error correction0–3
\fSets the foreground colorRGB value from 0 to 0xFFFFFF
\bSets the background colorRGB value from 0 to 0xFFFFFF
Keep scan reliability first: use a dark foreground on a light background, preserve the empty border, and scan the code again after changing its size or colors.

When DisplayBarcode Is the Best Method

Use DisplayBarcode when you are working in Word for Windows and need a simple QR code without logos, scan analytics, or a destination that can be changed through an external dashboard.

Method 2: Generate a QR Code with a Word Add-in

A compatible Office add-in can generate the QR code through a visual panel inside Word. This method is useful when you do not want to type a field command or want basic controls such as size and color.

Step 1: Open the Add-ins Menu

Depending on your Word version, open Insert > Get Add-ins or Home > Add-ins > More Add-ins.

Step 2: Search for a QR Code Add-in

Search for QR code. Review the publisher, supported Word versions, required permissions, privacy information, and recent reviews before installing an add-in.

One current example is QR4Office in Microsoft Marketplace. It can embed QR code images in Office documents and provides controls for color, background, size, and error correction.

Check permissions before installing: Microsoft Marketplace states that QR4Office can read and make changes to the document and can send data over the Internet. Avoid encoding confidential information until the add-in has been approved for your account or organization.
Office Add-ins store search results for QR code tools
Office Add-ins store search results for QR code tools

Step 3: Generate the Code

  1. Open the installed add-in inside Word.
  2. Enter the complete URL or content you want to encode.
  3. Adjust any available settings while keeping strong contrast.
  4. Select the add-in's generate or insert command.
  5. Scan the generated code to verify the destination.

Some business and education accounts block third-party add-ins or require administrator approval. Avoid entering confidential information until you have reviewed the add-in's permissions.

Need to Create Multiple QR Codes in Word?

For labels, tickets, certificates, or personalized letters, Word can create a different QR code for each record through Mail Merge. Store the destination URLs or IDs in an Excel column, connect that spreadsheet to Word, and use a MergeBarcode field that references the column heading.

For an Excel column named QR_Link, the field command can use:

MergeBarcode QR_Link QR \q 3
  1. Prepare the URLs or IDs in one Excel column.
  2. In Word, go to Mailings and connect the Excel file as the recipient list.
  3. Insert a MergeBarcode field that uses the exact Excel column heading.
  4. Preview the results and test several generated QR codes before completing the merge.
This is an advanced workflow: the main tutorial above focuses on generating one QR code. Use Mail Merge only when every record needs its own destination.

For the full setup, see Microsoft's guide to adding barcodes to labels.

What If Your Version of Word Cannot Generate a QR Code?

When DisplayBarcode is unavailable and your account cannot install an add-in, create the QR code with an online generator and add the downloaded image to Word.

  1. Enter the URL in an online QR code generator.
  2. Generate and test the code.
  3. Download it as a clear PNG image.
  4. In Word, select Insert > Pictures.
  5. Select the image and resize it from a corner.

This is a compatibility fallback: the QR code is generated outside Word and then added to the document.

Need help selecting a suitable tool? Compare the best QR code generators without turning this Word tutorial into a full generator comparison.

How to Make a QR Code Created in Word Scan Correctly

  • Use a dark code on a light background.
  • Preserve the empty border around the QR code.
  • Do not stretch the code vertically or horizontally.
  • Test it after saving the Word document.
  • Test it again after exporting to PDF or printing.
  • Check that the destination is accessible to other users.

Creating a QR Code in Word vs. Creating One for a Word File

Creating a QR code in Word means Word generates or contains a QR code that links to a URL, form, portfolio, video, or other destination.

Creating a QR code for a Word document means the code opens the DOCX file itself. To do that, upload the file, create a shareable link, and generate a QR code for the link.

Use the separate guide to convert a PDF or Word document to a QR code when the complete file—not a webpage link inside the document—is the destination.

Troubleshooting QR Code Generation in Word

Word Shows the Command Instead of a QR Code

Right-click the field and select Toggle Field Codes.

The Command Does Not Generate a QR Code

Make sure Word created the braces with Ctrl + F9. Check that the destination is inside straight quotation marks and that QR appears after it.

The Generated QR Code Opens the Wrong Link

Toggle the field code, inspect the URL for spelling errors or extra spaces, update the field, and scan it again.

The QR Code Does Not Scan After Printing

Increase its printed size, keep the code square, use stronger contrast, preserve the empty border, and print another test page.

The Add-in Is Missing or Blocked

Use DisplayBarcode in Word for Windows or use the online-generator fallback when your account cannot install add-ins.

Frequently Asked Questions

Can Word generate a QR code without an add-in?

Yes. Word for Windows can generate a QR code through the DisplayBarcode field. Press Ctrl + F9, enter the command, and toggle the field code.

Does Microsoft Word have a QR code button?

Word does not provide a universal built-in QR Code button. Use DisplayBarcode or install a compatible QR code add-in.

Can I generate a QR code in Word on Mac?

DisplayBarcode is documented for Word desktop on Windows. On Mac, check for a compatible add-in; otherwise, use an external generator as a fallback.

Can I generate a QR code in Word Online?

Use a compatible Word add-in when available. Otherwise, generate the code externally and add the downloaded image to the online document.

Can I change a DisplayBarcode QR code later?

Yes. Toggle the field code, edit the encoded URL or text, update the field with F9, and generate the visible code again.

Does a QR code generated in Word expire?

A static code does not expire by itself, but it will stop working if the linked destination changes, is deleted, or becomes inaccessible.

Can Word generate multiple QR codes from Excel data?

Yes. Word can use Mail Merge with the MergeBarcode field to generate one QR code for each record in an Excel data source. The field name in the command must match the Excel column heading.

WPS WriterWPS PresentationWPS SpreadsheetWPS PDF
Create and Edit Word Documents with QR Codes for Free

No Microsoft Word? Finish the QR Code Document in WPS Writer

The DisplayBarcode method requires Word for Windows. When Microsoft Word is not available, you can still complete the same document task by generating the QR code online and placing the downloaded image in WPS Writer.

WPS Writer can open and edit Word-compatible DOC and DOCX files, so you can continue working on an existing Word document or create a new one without changing the main file format.

How to Add the Generated QR Code in WPS Writer

  1. Generate the QR code with an online tool and download it as a clear PNG image.
  2. Open WPS Writer and create a new document or open the existing DOCX file.
  3. Select Insert > Picture and choose the downloaded QR code image.
  4. Resize the code from a corner so it remains square, then adjust the text-wrapping and position.
  5. Save the document as a Word-compatible file and scan the QR code again before sharing or printing.
What WPS Writer does here: WPS Writer is used to open, edit, position, and save the Word-compatible document. The QR code itself is generated by the online QR tool.
Create and edit Word-compatible documents with WPS Writer.
Open DOCX files, insert the generated QR code image, adjust the page layout, and save the finished document.
Free Download
Algirdas Jasaitis

15 years of office industry experience, tech lover and copywriter. Follow me for product reviews, comparisons, and recommendations for new apps and software.