inyourbrowser.com

Barcode generator

Barcode generator is a browser-based tool that produces Code 128, EAN-13, and UPC-A barcodes. It calculates EAN and UPC check digits automatically, renders to scalable SVG or 2x PNG, and downloads either format with one click. The tool runs in your browser.

FORMAT
0 chars

Enter text above to generate a barcode

Barcodes generated locally using JsBarcode. All processing runs in your browser.

How to generate a barcode

  1. Choose the barcode format. Code 128 for printable ASCII text, EAN-13 or UPC-A for product codes.
  2. Type your data into the input field (EAN-13 requires 12 digits, UPC-A requires 11 digits).
  3. The barcode renders as an SVG in your browser instantly.
  4. Click "Download SVG" or "Download PNG" to save it.

Common uses

  • Generating Code 128 barcodes for internal product tracking or inventory systems, paired with unique IDs for each item
  • Creating EAN-13 or UPC barcodes for retail product packaging or pricing labels
  • Producing barcodes for event tickets, library systems, or asset tags. Use a QR code generator for URLs and digital content instead

Technical specification

  • Algorithm or formula: Format-specific encoding (Code 128, EAN-13, UPC-A). EAN-13 and UPC-A check digits are computed in-tool from the GS1 modulo-10 weighted-sum rule (alternating 1 and 3 weights).
  • Browser API or library: JsBarcode 3.12, bundled with the site and loaded when the tool first needs it, drawing into an inline SVG element. PNG export rasterises the SVG through the Canvas API.
  • Input limits: EAN-13 expects 12 digits, UPC-A expects 11 digits (the 13th and 12th check digits are added automatically). Code 128 accepts any printable ASCII text.
  • Output: SVG (vector, .svg) or PNG (raster at twice the SVG size, .png).
  • Known limitations: Only EAN-13, UPC-A, and Code 128 are exposed. Code 39, ITF, and DataMatrix are not included. Use a QR code for URL or long-text payloads.

Frequently asked questions

What barcode formats are supported?
Three formats: Code 128 (general purpose: printable ASCII letters, digits, punctuation and spaces), EAN-13 (13-digit product codes used outside North America), and UPC-A (12-digit North American product codes). Code 128 is the most versatile and the default.
Is my data sent to a server?
All processing runs in your browser using JsBarcode. Our servers are not involved at any point.
Do EAN-13 and UPC barcodes need a check digit?
You enter 12 digits for EAN-13 and 11 digits for UPC-A. The tool automatically calculates and appends the check digit.
What is the difference between SVG and PNG download?
SVG is vector format, infinitely scalable and ideal for print. PNG is raster at 2x resolution, suitable for on-screen use. Use SVG for physical labels and packaging.

Related tools

QR code generator
Generate QR codes for URLs, plain text, or Wi-Fi credentials. Download as PNG or copy as SVG. Runs in your browser.
QR code scanner
Decode QR codes from uploaded images or your webcam. All decoding runs in your browser.
UUID generator
Generate random UUID v4 values in bulk. Uses the browser's crypto API.

Reviewed and tested September 30, 2026.