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 HeroesEncoded 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.
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.
Four steps, no manual.
- Choose a symbology — Code 128 for any text or numbers, EAN-13 for retail product codes.
- 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.
- Tune bar width, bar height, colors and the human-readable text toggle to suit your label.
- Click Download PNG or Download SVG to save, or Copy SVG markup to paste directly into your design tool.
Frequently asked questions.
Is the Barcode Generator free?
Is it private? Is my data uploaded anywhere?
What is the difference between Code 128 and EAN-13?
How is the EAN-13 check digit handled?
Should I download PNG or SVG?
Will these barcodes actually scan?
Published · Last updated .