Skip to content
§
§ · free tool

Barcode generator. Scannable in seconds.

Create Code 128 and EAN-13 barcodes with a live preview — tune bar width, height and colors, then export as PNG or SVG. Everything is encoded in your browser; nothing is uploaded or stored.

A free online tool by Digital Heroes

Encoded in your browser — nothing is uploaded or stored.

Two real standards, encoded from scratch

Code 128 packs any ASCII text and auto-switches between code set B (text) and C (pairs of digits) for compact numeric runs, with the required modulo-103 check symbol. EAN-13 takes 12 digits, computes the modulo-10 check digit (or verifies it if you supply all 13), and lays out the left/right guard and centre patterns. The encoders are written in plain JavaScript right on this page — no library, no server.

§ 02 · what you can do

Everything a barcode tool should do.

  • Generate Code 128 barcodes from any standard ASCII text or number string — the encoder auto-switches code sets B and C for compact digit runs.
  • Generate EAN-13 retail barcodes from 12 digits (the check digit is computed for you) or validate a full 13-digit code.
  • Watch the live preview redraw on every keystroke, with an inline hint showing the check digit or character count.
  • Adjust bar width (1–6 px) and bar height (30–220 px) with sliders to fit your exact label dimensions.
  • Customise bar and background colors for print or on-screen use, and toggle the human-readable text below the bars.
  • Export as lossless PNG or scalable SVG, or copy the SVG markup straight to your clipboard for design tools.
§ 03 · how to use it

Four steps, no manual.

  1. Choose a symbology — Code 128 for any text or numbers, EAN-13 for retail product codes.
  2. Type your data into the input field. The preview updates instantly, and the hint below flags any invalid input or shows the computed check digit.
  3. Tune bar width, bar height, colors and the human-readable text toggle to suit your label.
  4. Click Download PNG or Download SVG to save, or Copy SVG markup to paste directly into your design tool.
§ 04 · faq

Frequently asked questions.

Is the Barcode Generator free?
Yes — completely free for everyone. No sign-up, no account and no usage limits.
Is it private? Is my data uploaded anywhere?
No upload, ever. The Code 128 and EAN-13 encoders are plain JavaScript running entirely in your browser — the data you encode never leaves your device, and nothing is stored.
What is the difference between Code 128 and EAN-13?
Code 128 encodes any standard ASCII text or numbers and is the workhorse for logistics, internal SKUs and shipping labels. EAN-13 is the fixed 13-digit retail product code (GTIN-13) you see on store shelves worldwide — digits only, with a mandatory check digit.
How is the EAN-13 check digit handled?
Enter 12 digits and the tool computes the modulo-10 check digit and appends it automatically. Enter all 13 digits and it verifies the last one — if it doesn't match, the hint tells you what the correct check digit should be.
Should I download PNG or SVG?
SVG for print and design work — it scales to any size with perfectly crisp bars. PNG for quick on-screen use or systems that only accept raster images; increase the bar width first if you need a higher-resolution PNG.
Will these barcodes actually scan?
Yes — both encoders implement the real specifications, including the modulo-103 check symbol for Code 128, the modulo-10 check digit for EAN-13, and proper quiet zones on both sides. For reliable scanning, keep dark bars on a light background and print at an adequate size.

Published · Last updated .

Online now

Hi there. How can we help you today?

Reply