induwara.lk
induwara.lkUtility · Generator

Barcode Generator — Code 128, EAN-13, UPC-A, ITF, Code 39, Codabar

Create a scannable 1-D barcode in seconds. Pick a symbology, type the value, and download a print-ready PNG or vector SVG. GS1 check digits are calculated and verified for you. Encoded entirely in your browser — no signup, no upload, no watermark.

By Induwara AshinsanaUpdated May 11, 2026
Generate a barcodeISO/IEC 15417
Runs in your browser

All printable ASCII. Most space-efficient general-purpose 1-D code for short text.

11 / 80

Printable ASCII (space through tilde). Letters, digits, symbols.

Quick presets
Type a value on the left — your barcode appears here instantly.
Encoded in your browser — input never leaves the page.

How it works

A 1-D barcode encodes a short string into a sequence of bars and spaces whose widths the scanner measures and decodes back to the original text. Each symbology — Code 128, EAN-13, UPC-A, ITF, Code 39, Codabar — defines its own alphabet, character widths, start and stop patterns, and (for retail formats) a check digit so a single misread digit can be detected and rejected. This generator validates your input against the rules of the symbology you chose, then hands it to the bwip-js encoder, which implements BWIPP — Barcode Writer in Pure PostScript, the reference implementation used by the symbology committees.

Symbology rules summarised.

  • Code 128 (ISO/IEC 15417) — variable length, all 128 ASCII code points. Three code sets (A, B, C) cover upper-case + controls, full ASCII, and double-digit shorthand. The encoder picks the densest set for you and inserts the modulo-103 check character.
  • EAN-13 (ISO/IEC 15420) — exactly 13 digits. Twelve data digits + GS1 mod-10 check digit. First three digits are the country prefix (e.g. 590 = Poland, 200–299 = internal use). Used outside North America for retail.
  • UPC-A (ISO/IEC 15420) — exactly 12 digits. Eleven data digits + GS1 mod-10 check digit. The standard for retail in the United States and Canada.
  • ITF / Interleaved 2 of 5 (ISO/IEC 16390) — digits only, length must be even. Used on outer cartons (ITF-14 is the most common length) because the dense interleaved pattern fits more digits in less width than competing numeric symbologies.
  • Code 39 (ISO/IEC 16388) — uppercase letters, digits, and the symbols - . $ / + % plus space. The asset-tag standard. Self-checking, but a Mod-43 check digit can be added for extra integrity.
  • Codabar (AIM USS-Codabar) — digits and the symbols - $ : / . +, framed at both ends by one of the start / stop letters A, B, C, or D. Used by US libraries and FedEx airbills.

GS1 mod-10 check digit. EAN-13 and UPC-A both use the same algorithm published in GS1 General Specifications §7.9.1: starting from the rightmost data digit, multiply by 3 and 1 alternately, sum the products, take the result modulo 10, and the check digit is (10 − sum mod 10) mod 10. The page calculates this digit independently from the rendered symbol, then compares it against the digit baked into the barcode by bwip-js. If they ever disagreed, the "Verified" status tile would flip — a regression alarm that costs nothing to run.

Rendering.The barcode is drawn at three pixels per module width (the "X-dimension"), then exported as either a PNG raster suitable for print at retail sizes or a single-path SVG vector that scales to any label dimension without aliasing. Colours are user-controllable; bars must remain materially darker than the background for reliable scanning.

Worked examples

EAN-13 · check-digit calculation from a 12-digit base

  1. Base GTIN (12 digits): 5 9 0 1 2 3 4 1 2 3 4 5
  2. Odd-position sum (pos 1,3,5,7,9,11) ×1: 5+0+2+4+2+4 = 17
  3. Even-position sum (pos 2,4,6,8,10,12) ×3: 3·(9+1+3+1+3+5) = 66
  4. Sum = 17 + 66 = 83. Check = (10 − (83 mod 10)) mod 10 = 7
  5. Symbol encoded: 5901234123457

UPC-A · check-digit calculation from an 11-digit base

  1. Base (11 digits): 0 1 2 3 4 5 6 7 8 9 0
  2. Odd-position sum (pos 1,3,5,7,9,11) ×3: 3·(0+2+4+6+8+0) = 60
  3. Even-position sum (pos 2,4,6,8,10) ×1: 1+3+5+7+9 = 25
  4. Sum = 85. Check = (10 − 5) mod 10 = 5
  5. Symbol encoded: 012345678905

Code 128 · short text edge case

  1. Input: "induwara.lk" (11 chars)
  2. Validate: every char is in ASCII 0x20–0x7E ✓
  3. Encoder picks Code Set B (alphanumeric + lowercase)
  4. Modulo-103 check character is computed and embedded
  5. Symbol is the densest 1-D code for this string.

ITF · odd-length rejection

  1. Input: 123456789 (9 digits)
  2. Validate: digits only ✓
  3. Validate: length is odd ✗
  4. Error: ITF needs an even number of digits — add or drop one.
  5. Suggested fix: 1234567890 (10 digits) → encodes 5 pairs.

Frequently asked questions

Sources & references

Related tools

Rate this tool
Be the first to rate

Comments & feedback

Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.

Found a bug, a misread symbol, or want another barcode format?

Email me at [email protected] — most fixes ship within 24 hours.