Barcode Generator

Create a scannable Code 128-B barcode from any text, or an EAN-13 product code with its check digit computed for you. Download a PNG or copy the SVG — everything is drawn on this page.

Content

Code 128-B covers the printable ASCII set, so no accented characters.
Your text and type are kept in this browser only. Clear removes them.

Preview

Your barcode will appear here.

Test a printed barcode with a real scanner before relying on it — screen renderers vary.

Private by design. This page has no backend. The barcode is computed by JavaScript on your own device and your text is never sent anywhere.

About the two formats

Code 128-B

Code 128 encodes the full ASCII set across three overlapping character sets; this tool uses set B, which covers everything you can type on a standard keyboard from uppercase and lowercase letters to punctuation. Each character becomes a sequence of bars and spaces 1 to 4 modules wide, a weighted modulo-103 check digit is appended, and the whole symbol starts and ends with fixed guard patterns. The pattern table here follows ISO/IEC 15417:2007.

EAN-13

The 13-digit code on nearly every retail product. Twelve digits carry the data — country prefix, manufacturer, product — and the thirteenth is a check digit computed from the others with alternating weights of 1 and 3. Give this tool 12 digits and it computes the check digit for you; give it 13 and it verifies the one you supplied. The first digit also chooses a left/right parity pattern for the bars, which is part of the standard and handled here.

Which to use

Use Code 128 for internal codes: asset tags, membership cards, tickets, shelf labels. Use EAN-13 only when a retailer requires it — it holds exactly 13 digits and nothing else, and real retail assignments come from GS1 rather than being invented.

Scanning advice

Print at 100% scale with no smoothing, keep the white quiet margins at each end intact, and test with the scanner or phone app you intend to use. Quiet zones and print contrast matter as much as the encoding itself.

Common uses

Asset and inventory labels, event tickets, library cards, shelf price tags, sample vials and boxes, and generating product-barcode mock-ups for design work.

How to use the Barcode Generator

  1. Choose the barcode type — Code 128-B or EAN-13.
  2. Type the text to encode; EAN-13 needs 12 digits and the check digit is added for you.
  3. Download the barcode as a PNG or copy the SVG.

Frequently asked questions

Does EAN-13 need a check digit?

You enter the 12 digits and the tool calculates and appends the 13th check digit automatically.

What data can Code 128-B hold?

Printable ASCII text — letters, digits and common symbols — which suits many labels and internal codes.

Will the barcode scan reliably?

The PNG is drawn at a high resolution so it stays crisp when printed and scans dependably.