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)
- Click where you want the barcode to appear.
- 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. - Between the braces, type:
DisplayBarcode "12345678" CODE128 - Press F9 to update the field, or right-click inside it and choose Update Field. The text becomes a barcode.
- 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.
- Open a barcode generator, choose the format (UPC, EAN, Code 128, QR, and so on), and enter your data.
- Download the barcode as an image.
- In Word, go to Insert > Pictures > This Device and select the file.
- 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.
- Set up your mail merge as usual: Mailings > Start Mail Merge, then connect your Excel or Word data source.
- Click where the barcode should go, then press Ctrl+F9 for a new field.
- Type the field code referencing your merge fields, for example:
Insert the inner{ DisplayBarcode "{ MergeField OrderID }" CODE128 \h 1440 }MergeFieldfield the normal way (Mailings > Insert Merge Field) so Word treats it as a nested field rather than plain text. - Preview the merge to confirm each row generates a different, correctly formatted barcode.
- 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?
| Method | Best For | Platform | Formats |
|---|---|---|---|
| DisplayBarcode / MergeBarcode field | Automatic generation, mail merge | Windows only | QR, Code 39, Code 128, EAN, UPC, and more |
| Barcode font | Cross-platform, quick Code 39 | Windows and Mac | Code 39 easiest; others need pre-encoding |
| Inserted image | Any format, exact UPC/EAN | Windows and Mac | Any 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.
Related Guides
- How to Create a Barcode in Excel - the same font and image-based methods, adapted for spreadsheet formulas
- How to Create a Barcode in Google Sheets - font and IMAGE-formula methods for Sheets
- How to Print Barcode Labels - label sheet setup and printer settings after your barcodes are created
- Bulk Barcode Generator Guide - generate large batches of barcode images from a CSV
Sources
- Add barcodes to labels - Microsoft Support - Microsoft's official guide to the DisplayBarcode and MergeBarcode field codes in Word.
- Field codes: DisplayBarcode - Microsoft Support - documentation of the field's supported barcode types and switches, including the Windows-only platform limitation.
- Libre Barcode 39 - Google Fonts - the free, open-source Code 39 barcode font used in the font-based method.