How to Create a Barcode in Word: 3 Methods

Create scannable barcodes in Microsoft Word using the built-in DisplayBarcode field, barcode fonts, or inserted images, plus mail merge for bulk labels.

Word has no visible "Insert Barcode" button, but Windows versions of Word have shipped a genuine barcode generator hidden inside a field code for over a decade. Mac users and anyone who wants formats the field code doesn't cover have two reliable fallbacks: barcode fonts and inserted images.

This guide covers all three methods, plus how to generate a unique barcode per row in a mail merge.

How Do I Create a Barcode in Microsoft Word?

The fastest method on Windows is the built-in DisplayBarcode field code, which converts typed text into a real, scannable barcode with no font install or external tool. Press Ctrl+F9 to insert field braces, type DisplayBarcode plus your data and barcode type inside them, then press F9 to render it.

Using the DisplayBarcode Field (Windows)

  1. Click where you want the barcode to appear.
  2. Press Ctrl+F9. This inserts a pair of shaded field braces { }. Typing curly brackets directly on the keyboard does not work; Word needs the special field-brace character.
  3. Between the braces, type:
    DisplayBarcode "12345678" CODE128
    
  4. Press F9 to update the field, or right-click inside it and choose Update Field. The text becomes a barcode.
  5. To see the underlying code again later, right-click the barcode and choose Toggle Field Codes.

DisplayBarcode supports 10 barcode types: QR, CODE39, CODE128, EAN8, EAN13, JAN8, JAN13, UPCA, UPCE, and CASE (ITF-14), plus the Japanese postal format JPPOST. Switches control size and appearance, for example \h 1440 sets the barcode height in twips (1440 twips = 1 inch), and \q adds a quiet zone.

Platform limitation: DisplayBarcode only works in Word for Windows. Word for Mac does not support this field code; Mac users get a similarly named but different BarCode field under Insert > Field > Numbering, with its own, more limited switch set.

How Do I Add a Barcode Font to Word?

A barcode font is the most portable option because it works the same way on Windows and Mac, and it's the only practical route for anyone without access to DisplayBarcode. Install a free Code 39 font, wrap your text in asterisks, and apply the font at a large enough size to scan reliably.

Step 1: Install a Free Code 39 Font

Code 39 is the easiest barcode format to render with a font because there's no encoding table or check digit to calculate; the characters you type are exactly what the barcode encodes. Two good free options:

  • Libre Barcode 39, available from Google Fonts
  • Free 3 of 9, a long-standing free TrueType font

Download the .ttf file, then install it (right-click and choose Install on Windows, or double-click and choose Install Font in Font Book on Mac). Restart Word afterward so it picks up the new font.

Step 2: Format Your Data

Code 39 only encodes uppercase letters, digits, and a handful of symbols (space, - . $ / + %). Wrap your data in asterisks as start and stop characters. A product code like SKU100 becomes:

*SKU100*

Step 3: Apply the Font

Select the text with the asterisks, change the font to your installed barcode font, and set the size to 28pt or larger. Smaller sizes often fail to scan once printed. Set the text color to black and the background to white for the best contrast.

Limitations

Barcode fonts render only what the font family supports; Code 128 fonts exist but need the data pre-encoded, and UPC or EAN fonts are impractical because those formats require a calculated check digit that plain text can't produce on its own.

How Do I Insert a Barcode Image Into Word?

For barcode formats a font or field code can't handle cleanly, such as UPC-A or EAN-13 with a correct check digit, generating an image externally and inserting it is the most reliable option. This works identically on Windows and Mac and supports any symbology.

  1. Open a barcode generator, choose the format (UPC, EAN, Code 128, QR, and so on), and enter your data.
  2. Download the barcode as an image.
  3. In Word, go to Insert > Pictures > This Device and select the file.
  4. Resize the image, but keep the width-to-height ratio intact so the bars don't distort and become unreadable.

For more than a handful of barcodes, generating one image at a time gets slow. See the bulk barcode generator guide for producing a whole batch from a spreadsheet or CSV at once.

How Do I Use Barcodes in a Word Mail Merge?

Mail merge needs a different field, MergeBarcode, which pulls a unique value from each row of your data source instead of a single fixed value. Insert it the same way as DisplayBarcode, but point it at merge fields rather than literal text.

  1. Set up your mail merge as usual: Mailings > Start Mail Merge, then connect your Excel or Word data source.
  2. Click where the barcode should go, then press Ctrl+F9 for a new field.
  3. Type the field code referencing your merge fields, for example:
    { DisplayBarcode "{ MergeField OrderID }" CODE128 \h 1440 }
    
    Insert the inner MergeField field the normal way (Mailings > Insert Merge Field) so Word treats it as a nested field rather than plain text.
  4. Preview the merge to confirm each row generates a different, correctly formatted barcode.
  5. Complete the merge to produce one document (or one label) per row, each with its own barcode.

This is the same field-code approach used for creating shipping label barcodes at scale, and it inherits the same Windows-only limitation as DisplayBarcode.

Which Method Should I Use?

MethodBest ForPlatformFormats
DisplayBarcode / MergeBarcode fieldAutomatic generation, mail mergeWindows onlyQR, Code 39, Code 128, EAN, UPC, and more
Barcode fontCross-platform, quick Code 39Windows and MacCode 39 easiest; others need pre-encoding
Inserted imageAny format, exact UPC/EANWindows and MacAny format the generator supports

If you're on Windows and only need common formats, the field code is fastest since it needs no install. If you're on Mac, or need a format the field code doesn't cover, a font or an inserted image gets you there instead.

How Do I Test That a Word Barcode Actually Scans?

Print a sample page at 100% scale (not "Fit to Page") and scan it with a phone camera or a barcode scanner app before committing to a full print run. This catches sizing and encoding problems while they're cheap to fix instead of after printing dozens of labels.

Scan each test barcode with a web-based barcode scanner and confirm the decoded text exactly matches your source data, including leading zeros that some formats and fonts can silently drop. If a font-based barcode won't scan, increase the point size first; if a field-code barcode won't scan, check that the data fits the format's required length, since UPC and EAN fields expect an exact digit count.

Sources

Frequently Asked Questions

How do I create a barcode in Microsoft Word?
On Windows, press Ctrl+F9 to insert field braces, then type DisplayBarcode followed by your data and a barcode type like CODE128 or QR. Word renders the field as a scannable barcode. On Mac, use Insert > Field > Numbering > BarCode instead, since DisplayBarcode is Windows-only.
How do I add a barcode font to Word?
Download a free Code 39 font such as Libre Barcode 39 from Google Fonts, install it on your system, then restart Word. Type your data wrapped in asterisks (like *SKU100*), select that text, and apply the barcode font at 28pt or larger to render it as bars.
How do I use barcodes in a Word mail merge?
Use the MergeBarcode field instead of DisplayBarcode. Insert it with Ctrl+F9, reference your merge fields inside the quoted data argument, and specify a barcode type such as CODE128. Word generates a unique barcode for each row when you complete the merge, which is ideal for shipping labels or ID badges.
Can Word generate barcodes automatically?
Yes, on Windows. The DisplayBarcode and MergeBarcode field codes generate real barcodes automatically from typed or merged data, with no font installation or external tool required. Word for Mac lacks these fields, so Mac users need a barcode font or an inserted image instead.