Generate barcodes in Google Sheets by producing a print-ready SVG with a browser-based barcode generator (supporting Code 128, EAN-13, UPC-A, and Code 39) and inserting the file into a cell with Insert > Image or the =IMAGE() function — no font add-on, custom Apps Script, or paid API required. The whole workflow takes a few minutes: pick a barcode format, type your value, download the SVG, then drop the file into the sheet. Because the generator runs entirely in JavaScript inside your browser, the SKU, GTIN, or tracking number you type never leaves your device, and the resulting vector file stays sharp whether you scale it to a tiny label or a full-page print.
Google Sheets does not ship with a built-in barcode function, and the workarounds most people try have real downsides. Native-barcode font add-ons require you to install a third-party font per user, hand a license to a single vendor, and convert every value into a special non-text format that breaks sorting and formulas. Apps Script solutions call out to remote APIs, which means every refresh of your sheet can ping a third-party server with your product codes. Dedicated barcode Google Workspace add-ons usually charge per scan or per sheet. A local SVG generator sidesteps all of that: you keep the source number in plain text, paste or insert the image, and the underlying data stays searchable, sortable, and private.

Why a Local Barcode Generator Is the Cleanest Google Sheets Option
Spreadsheets are text-first environments, so the cleanest way to add a barcode is to keep the value as text and place the image next to it. That layout keeps the original GTIN, SKU, or tracking number intact for VLOOKUP, filtering, and CSV export, while the visual code lets a scanner read the same data off the printed sheet. The Barcode Generator produces a vector SVG that you can insert once and reuse across thousands of rows without paying per scan, and it works fully offline once the page has loaded.
Two other approaches show up in tutorials and are worth ruling out before you commit. Apps Script that calls a remote image API works, but every spreadsheet open triggers network requests, which slows large sheets and exposes your product codes to a vendor. Barcode fonts require every printer to have the font installed, and the encoded cell does not contain a real number — it contains a font rendering of a number — so SUM, FILTER, and pivot tables break. The SVG-in-a-cell approach uses the data and the image as two separate, well-behaved objects.
Pick the Right 1D Format for Your Sheet
The four 1D (linear) symbologies the tool supports are not interchangeable. Each one has a defined character set, length, and use case, and the rules come from the GS1 family of standards for retail codes and the ISO/IEC 16390 specifications for logistics. Pick the wrong one and a scanner will reject the label, even if the SVG renders cleanly.
| Format | Typical use case | Character set | Length rules |
|---|---|---|---|
| Code 128 | Shipping, logistics, SSCC pallet labels, mixed alphanumeric tracking numbers | Full ASCII (letters, digits, symbols) | Variable length; no fixed numeric limit |
| EAN-13 | Retail products sold worldwide | Numeric only (0–9) | Exactly 13 digits, last digit is the check digit |
| UPC-A | Retail products sold in the US and Canada | Numeric only (0–9) | Exactly 12 digits, last digit is the check digit |
| Code 39 | Automotive, defense, internal inventory, rugged alphanumeric tags | Uppercase letters, digits, and a few symbols | Variable length; no built-in check digit |
The default safe choice for any text-heavy use case such as shipping labels, pallet SSCCs, or asset tags is Code 128. If your sheet is a product catalog heading for retail, EAN-13 is the right answer outside North America and UPC-A inside the US and Canada. Reserve Code 39 for internal inventory labels where readers only need to decode a short alphanumeric code.
How an EAN-13 Check Digit Works
EAN-13 and UPC-A both end in a modulo-10 check digit — an extra digit calculated from the other 12 (or 11) digits so that a scanner can confirm it read the code correctly. The rule is fixed: digits in odd positions (1, 3, 5, …) are summed as-is, digits in even positions (2, 4, 6, …) are summed and multiplied by 3, and the check digit is the number that makes the total a multiple of 10. Suppose you want to print a label for the value 012345678905. The odd-position digits are 0, 2, 4, 6, 8, 0, which sum to 20. The even-position digits are 1, 3, 5, 7, 9, 5, which sum to 30, multiplied by 3 to give 90. Total: 20 + 90 = 110. Since 110 mod 10 = 0, the check digit is 0, giving a full code of 0123456789050. The Barcode Generator applies this rule for you, so you can also type the full 13-digit code and the tool will flag a typo before you print a useless label.
Build the Barcode in the Browser
Once you know which format matches your data, the actual generation step is short. Open the Barcode Generator in any modern browser, choose the format, type the value, and download the SVG. The image renders as you type, with no submit button and no waiting for a server round-trip.
- Open the Barcode Generator and pick a format from the dropdown — Code 128 for logistics, EAN-13 or UPC-A for retail, Code 39 for inventory.
- Type your value into the input field. For EAN-13, enter 12 digits and the check digit is added automatically; enter 13 and the tool verifies the check digit. For UPC-A, enter 11 digits and the check digit is added; enter 12 and the tool verifies it. For Code 128 and Code 39, type the full text as-is.
- Watch the rendered barcode appear in the preview area. If you paste a full 13- or 12-digit EAN or UPC code with a wrong check digit, the tool flags the typo so you can correct it before printing.
- Click Download SVG to save a print-ready vector file. The SVG is a plain text file you can open in any browser, vector editor, or label design app.
Because every barcode is generated locally, you can repeat the same workflow for any number of values without a usage cap, a watermark, or a sign-up. The only practical limit is how many distinct SVGs you want to keep open in your design tool or Sheets tabs.
Drop the SVG into Google Sheets
With the SVG saved, you have two reliable ways to put it into a Google Sheets cell, depending on whether you want a one-off image or a column of barcodes driven by a formula.
Option 1: Insert a single barcode with the menu
- Click the cell where you want the barcode to appear (or the cell to its right, since the image will overlap if the column is narrow).
- Go to Insert > Image > Upload from computer and pick the SVG you just downloaded.
- Drag the corners of the image to fit the cell, then use Right-click > Place in cell so the image stays with the row when you sort.
Option 2: Build a barcode column with =IMAGE()
If you keep a copy of the SVG on a host you control — Google Drive, a public CDN, or your own site — the =IMAGE() function lets one formula render the same barcode for every row that matches a value. The formula takes a URL, an optional mode, an optional height, and an optional width, and it returns the image inline. The pattern looks like:
=IMAGE("https://your-host.example.com/barcodes/row-sku.svg", 1, 80, 240)
From there, point the URL at a per-row file, or replace the URL with a service that generates the SVG on the fly using the SKU as a query parameter. If you also need a QR code column in the same sheet — for a web link, a contact card, or a Google Form — the QR Code Generator produces the same kind of vector output using the same local workflow.
Keep the Barcode Scannable in a Spreadsheet
Screens and printers both reward bars that stay sharp at the size you actually output. A few habits prevent the most common scanning failures:
- Use the SVG, not a screenshot. A PNG of the SVG adds blur to the bar edges, and a scanner can fail at small print sizes. Keep the original SVG file until the label is printed.
- Give the image enough room. Sheets will squash a wide SVG into a narrow column. Set the column width to roughly 20–30 pixels and the row height to roughly 60–80 pixels for a standard retail-scale label.
- Leave a quiet zone. A barcode needs empty white space on both sides equal to roughly 10 times the width of the narrowest bar. Resize the SVG with margin instead of cropping flush to the bars.
- Print at 300 DPI or higher. Lower DPI blurs the bar edges and triggers misreads. Most office laser printers hit 600 DPI by default, which is plenty.
- Test with a real scanner before mass-printing. Phone scanners are forgiving; warehouse and retail scanners are not. A 30-second test run with the actual hardware can save a full re-print.
Following these rules keeps the visual code in the sheet consistent with the printed label, the only way to guarantee that what a scanner reads matches the text in the cell next to it.