Barcode Generator
EverydayGenerate CODE128, EAN-13, EAN-8, UPC-A, and other barcodes as downloadable SVG. Free, browser-based — nothing uploaded, no sign-up required.
Reviewed by the thecalcu.com team · Last updated June 21, 2026
What is a Barcode?
A Barcode Generator encodes a number or text value into a standard one-dimensional barcode that any barcode scanner, a handheld laser scanner, a checkout counter unit, or a mobile scanning app, can decode. This generator supports six widely-used formats: CODE128, EAN-13, EAN-8, UPC-A, CODE39, and ITF-14, covering the full range from flexible internal inventory codes to international retail product identification.
Barcodes have been the backbone of retail, logistics, and inventory management since the 1970s. A barcode scanner reads the widths of the alternating bars and spaces, the white modules are as important as the black ones, and decodes them back into the original number or string. The encoding is format-specific: EAN-13 barcodes carry exactly 13 digits representing a globally unique product identifier, while CODE128 can carry any alphanumeric value of any length, making it the format of choice for internal barcode systems.
This generator uses the open-source JsBarcode library running entirely in your browser. You enter a value, select a barcode format, choose whether to display the human-readable digits below the bars, and download an SVG file. SVG is the correct format for barcode output, it is vector-based, scales to any print size without pixelation, and is accepted by every professional design tool.
For QR codes (the two-dimensional equivalent), use the QR Code Generator. For encoding WiFi credentials, use the WiFi QR Code Generator. For verifying that a barcode value follows the correct format, combine this generator with the relevant validator.
Why Use a Barcode Generator?
Creating barcodes previously required desktop software (Bartender, NiceLabel, or similar), a GS1 subscription for retail use, or expensive per-barcode generation services. For developers, designers, and small businesses, this browser-based generator handles the common use cases, product mockups, internal inventory labels, shipping labels, and test fixtures, without any installation or subscription.
The SVG output integrates directly into design workflows: paste it into Figma or Illustrator, resize to the correct print dimensions, and the vector paths remain sharp at any scale.
Who Should Use This Generator?
Manufacturers and retailers creating product label designs for review, generate a CODE128 or EAN-13 barcode for the design mockup, verify the layout, then replace with the registered barcode in the final production artwork.
Warehouse and logistics teams designing internal shipping label templates or asset tracking labels where CODE128 with a custom value format is the right tool.
Developers building inventory, point-of-sale, or warehouse management systems who need to test barcode generation output, verify scanner compatibility, or create test fixtures with known barcode values.
Designers building packaging designs or event badges who need a realistic barcode element in the layout. The SVG output imports cleanly into Figma, Illustrator, and InDesign without rasterisation.
Students and learners studying barcode standards, supply chain systems, or retail technology who need a quick tool to generate examples of different barcode formats side by side.
What Insights Does the Barcode Generator Give You?
The barcode preview updates immediately as you type or change settings. If the value you entered is incompatible with the selected format (e.g. letters entered for an EAN-13 field that requires digits), an error message explains the specific constraint violated.
Each format has different visual characteristics visible in the preview: CODE128 bars are more densely packed for longer values; EAN-13 has the characteristic guard bars and centre bar with a digit displayed below; CODE39 is recognisably wider with asterisk start/stop markers. Seeing the rendered barcode lets you verify which format fits your label dimensions before committing to a design.
How to use this Barcode calculator
- Enter the value you want to encode, a product number, asset ID, invoice number, or any identifier appropriate for your use case.
- Select the barcode format, CODE128 for any alphanumeric value; EAN-13 for retail products (exactly 13 digits); UPC-A for North American retail (12 digits); EAN-8 for small packaging (8 digits); CODE39 for alphanumeric logistics codes; ITF-14 for shipping cartons (14 digits).
- Check or uncheck "Show value below barcode", most retail and inventory barcodes display the human-readable digits below the bars as a fallback if the scanner fails. Uncheck for embedded barcodes where space is tight.
- Review the preview, confirm the barcode renders without errors and looks correct for your use case.
- Click Download SVG, save the vector file to your device.
- Place in your design tool, import the SVG into Figma, Illustrator, InDesign, or any other tool; resize to meet the minimum print dimensions for your chosen format.
Formula & Methodology
CODE128 uses three encoding modes (A, B, C) selected automatically by the library to minimise the total bar count for the given value. Each character maps to a defined bar-and-space pattern; the overall barcode includes a start character, data characters, a checksum character, and a stop character.
EAN-13 encodes 12 data digits plus 1 checksum digit. The checksum is calculated as:
- Alternately multiply each digit by 1 and 3 (left to right)
- Sum all products
- Checksum = (10 − (sum mod 10)) mod 10
For example, for the 12 digits 890123456789:
- Sum = (8×1) + (9×3) + (0×1) + (1×3) + (2×1) + (3×3) + (4×1) + (5×3) + (6×1) + (7×3) + (8×1) + (9×3)
- = 8 + 27 + 0 + 3 + 2 + 9 + 4 + 15 + 6 + 21 + 8 + 27 = 130
- Checksum = (10 − (130 mod 10)) mod 10 = (10 − 0) mod 10 = 0
- Full EAN-13: 8901234567890
UPC-A uses the same checksum algorithm as EAN-13 applied to 11 digits.
ITF-14 uses a modulo-10 checksum on 13 digits, producing the 14th check digit.
Output format: All barcodes are generated as SVG with bars as vector rect elements on a white background. The human-readable text (when enabled) uses Arial at 14px, positioned centred below the bars.Frequently Asked Questions