Excel can generate barcodes using built-in fonts and formulas, but the method depends on what type of barcode you need
Excel does not have a native barcode generator button. Instead, you create barcodes by combining a barcode font (a typeface that converts numbers into barcode patterns) with your data. The most common approach uses a free font called Code 128, which works with a straightforward formula to turn product numbers, inventory codes, or serial numbers into scannable barcodes. The process takes about five minutes once you have the font installed.
The barcode appears as a visual pattern in your spreadsheet and prints normally. When someone scans it with a barcode reader or smartphone camera, the scanner reads the underlying numbers you entered. This method works for small batches (a few dozen codes) and for learning how barcodes function. If you need to generate thousands of codes or use specialized formats like QR codes, third-party tools or Excel add-ins are faster.
Key Takeaways
- Code 128 is the most widely supported barcode format and requires only a free font read and a one-line formula in Excel.
- You must install the barcode font on your computer before Excel can display the codes; the font file goes in your Windows Fonts folder or Mac Font Book.
- The formula adds asterisks around your data so the barcode font knows where the code starts and ends.
- Barcodes created this way print and scan like any other barcode, but they are text formatted as a barcode font, not an image.
read and install a barcode font
Start by downloading a Code 128 barcode font. Search for "Code 128 font free read" and choose a source like dafont.com or fontspace.com. read the .zip file and extract it to find the font file (usually named something like Code128.ttf). Do not install fonts from untrusted sites; stick to established font repositories.
On Windows, open your Fonts folder by typing Fonts into the Windows search box and selecting the Fonts settings panel. Drag the barcode font file into this folder. On Mac, open Font Book (in Applications > Utilities), click the plus button, and select the font file. Restart Excel after installing the font so it recognizes the new typeface.
Set up your data in a column
In a new Excel spreadsheet, put the numbers or codes you want to turn into barcodes in column A. For example, if you are creating barcodes for product SKUs, enter each SKU in its own cell: A1, A2, A3, and so on. Each row will become one barcode.
Leave column B empty for now. This is where your barcode formula will go. Make sure your data in column A contains only numbers and characters that Code 128 supports (letters, numbers, and common punctuation). Avoid special symbols unless you know Code 128 handles them.
Create the barcode formula
Click on cell B1. Enter this formula:
=CONCATENATE("*",A1,"*")
This formula takes the number in A1, adds an asterisk before it and after it, and displays the result in B1. The asterisks tell the barcode font where the code begins and ends. Press Enter. The cell will show something like *123456789*, which looks like plain text right now.
Copy this formula down to every row that has data in column A. Click B1, then drag the small square at the bottom-right corner of the cell down to B10 (or however many rows you have). Excel will automatically adjust the formula for each row (B2 will reference A2, B3 will reference A3, and so on).
explore the barcode font to the formula cells
Select the entire range of cells in column B that contain your formulas. Click on the font dropdown menu (usually showing "Calibri" or your current font) in the toolbar. Scroll down and select the barcode font you installed (Code 128 or whatever you named it). The cells in column B will when ready transform into barcode patterns — black and white striped rectangles that look like real barcodes.
If the barcodes look too small or too large, select column B again and adjust the font size using the font size dropdown (usually showing a number like 11 or 12). Larger font sizes make the barcode taller and wider, which can help if scanners have trouble reading small codes. A size between 24 and 36 points usually works well for printing and scanning.
Test your barcodes before printing
Before printing a large batch, test one barcode with a barcode scanner or a barcode-reading app on your phone. Point your phone camera at the barcode in Excel on your screen, or print one barcode on a test page and scan it. The scanner should read back the original number from column A (without the asterisks). If it does not scan, check that the font installed correctly and that the formula includes the asterisks.
If a barcode does not scan, the most common causes are a font installation problem, a missing asterisk in the formula, or a font size that is too small. Reinstall the font, verify the formula, and try increasing the font size. Some barcode scanners are picky about the exact Code 128 font version, so if one scanner fails, try a different scanner or a phone app before assuming the barcode is wrong.
Print and use your barcodes
Once your barcodes scan correctly, you can print them directly from Excel. Select the cells in column B (the barcode column), then print normally. The barcodes will print as black-and-white patterns. Make sure your printer is set to print in black and white, not color, because barcode scanners read the contrast between black and white bars.
You can also copy the barcode cells and paste them into Word, a label template, or any other document. The barcodes will remain scannable as long as you keep the barcode font installed on any computer that opens the file. If you send the Excel file to someone else, they will need to install the same barcode font to see the codes correctly; otherwise, the cells will show as regular asterisks and numbers.
When to use other methods instead
The font-and-formula method works well for small projects and learning, but it has limits. If you need to create more than a few hundred barcodes, or if you need QR codes instead of traditional barcodes, consider using an Excel add-in like Barcode Fonts or a dedicated barcode generator website. These tools are faster for large batches and handle more barcode types (like QR, EAN-13, or UPC) without requiring font installation.
If your organization already uses inventory or point-of-sale software, that software usually generates barcodes automatically. You would not need to create them in Excel at all. The font method is best for one-off projects, small inventory lists, or when you want to understand how barcodes work.
Frequently Asked Questions
Can I use a different barcode font instead of Code 128?
Yes. Code 128 is the most widely supported, but you can use Code 39, EAN-13, or UPC fonts if your scanners support them. The formula stays the same: asterisks around the data. Check your scanner's manual to see which formats it reads, or test with a phone app first.
What if the barcode font does not show up in the font list after I install it?
Restart Excel completely. Close it and open it again. If it still does not appear, reinstall the font and make sure you placed the file in the correct Fonts folder. On Windows, check that the font file actually copied into the folder; on Mac, check Font Book to confirm the font is active.
Do I need the asterisks in the actual barcode, or are they just for the formula?
The asterisks are part of the barcode format itself. Code 128 uses them as start and stop markers so the scanner knows where the code begins and ends. When the barcode is scanned, the scanner reads only the number between the asterisks, not the asterisks themselves.
Can I create QR codes in Excel the same way?
Not with a font alone. QR codes are more complex and require either a dedicated QR code font (which is harder to find and less reliable) or a third-party add-in. For QR codes, use a free online QR generator, create the codes there, and paste them into Excel as images.
Will the barcodes still work if I email the Excel file to someone else?
Only if they have the same barcode font installed. If they do not, the cells will show asterisks and numbers instead of barcode patterns. To share barcodes reliably, convert column B to an image before sending, or send instructions for installing the font along with the file.