How to add a barcode in Word
- Press Ctrl+F9 to insert field braces where the barcode should go.
- Type
DISPLAYBARCODE "your value" CODE128inside the braces. - Press F9 to update the field and show the barcode.
- For labels from a spreadsheet, use Mailings → Labels with a
MERGEBARCODEfield, or our label generator.
Short answer: press Ctrl+F9 in Word to insert field braces and type DISPLAYBARCODE "INV-55120" CODE128, then press F9 to update. For labels from a spreadsheet, use mail merge with MERGEBARCODE. Supported types include QR, CODE128, CODE39, EAN13, EAN8, UPCA, UPCE, ITF14 and NW7 (Codabar).
Method 1: DISPLAYBARCODE field
- Click where you want the barcode and press Ctrl+F9 (on Mac, Cmd+F9) to insert field braces
{ }. Do not type the braces yourself. - Inside, type for example
DISPLAYBARCODE "INV-55120" CODE128 \h 1000. The\hswitch sets the height in twips. - Right-click and choose Toggle Field Codes or press F9 to show the barcode.
Values must be valid for the type: EAN13 needs 12 or 13 digits, CODE39 capitals and digits, and so on, or Word shows an error.
Method 2: mail merge barcode labels
- Go to Mailings → Start Mail Merge → Labels and choose your label product (for example Avery 5160).
- Select Recipients and pick your Excel file or CSV.
- In the first label, insert field braces and type
MERGEBARCODE SKU CODE128, where SKU is your column name. Add any other merge fields, such as the product name. - Click Update Labels, then Finish & Merge.
Prefer not to deal with field codes? Our label generator prints barcodes from a pasted list straight onto Avery and thermal labels as a PDF.
Method 3: INCLUDEPICTURE with the barcode API
Word for Windows can pull an image from a URL with an INCLUDEPICTURE field, which gives you any of our 100+ barcode types from the free barcode API. Press Ctrl+F9 and type INCLUDEPICTURE "https://barcodejar.com/api/barcode?type=upca&data=012345678905" \d, then press F9. In a mail merge you can nest a merge field in the URL, for example data={ MERGEFIELD SKU }, then select all and press F9 after merging to refresh the images.
Method 4: insert a barcode image
Make the barcode above, download it as PNG (or SVG in recent versions of Word), then use Insert → Pictures. Images work in every version of Word and support all 100+ barcode types on this site. For many images, use the bulk generator.
See also: barcode generators for every platform, product and use case.
Frequently asked questions
Does Word have a barcode generator?
Yes. Word 2013 and later include the DISPLAYBARCODE and MERGEBARCODE field codes, which draw barcodes such as Code 128, Code 39, EAN-13, UPC-A and QR.
Why does my DISPLAYBARCODE field show an error?
The value is not valid for the barcode type (for example letters in EAN13), or the braces were typed instead of inserted with Ctrl+F9.
How do I print barcode labels with mail merge?
Start a Labels mail merge, connect your spreadsheet, and add a MERGEBARCODE field with your column name and barcode type in the first label. Then Update Labels and Finish & Merge.
Can I use a barcode font in Word?
Yes, Code 39 fonts work if you add * at both ends. Code 128 and UPC fonts need encoded text. See the barcode fonts guide.
What label sizes can I print?
Any label Word lists, such as Avery 5160 (30 per sheet). Our label generator also supports A4 and thermal sizes.