Skip to main content
L
Loopaloo
Buy Us a Coffee
All ToolsImage ProcessingAudio ProcessingVideo ProcessingDocument & TextPDF ToolsCSV & Data AnalysisConverters & EncodersWeb ToolsMath & ScienceGames
Guides & BlogAboutContact
Buy Us a Coffee
L
Loopaloo

Free online tools for developers, designers, and content creators. Your files are processed in your browser and are never uploaded - no accounts required. A few network utilities (like What's My IP and Currency Converter) call public APIs to do their job and say so on their pages.

support@loopaloo.com

Tool Categories

  • Image Tools
  • Audio Tools
  • Video Tools
  • Document & Text
  • PDF Tools
  • CSV & Data
  • Converters
  • Web Tools
  • Math & Science
  • Games

Company

  • About Us
  • Contact
  • Blog
  • FAQ

Legal

  • Privacy Policy
  • Terms of Service
  • Disclaimer

Support

Buy Us a Coffee

© 2026 Loopaloo. All rights reserved. Built with privacy in mind.

Privacy|Terms|Disclaimer
  1. Home
  2. Converters & Encoders
  3. Barcode Generator
Add to favorites

Barcode Generator

Generate linear barcodes with the quiet zone each standard requires, and read the bars back to check they are right

Runs locally in your browserMore converters & encodersJump to full guide

Related reading

  • Barcode Symbologies and the Math of Check Digits11 min read
  • QR Code Best Practices: Size, Error Correction, and Design Tips11 min read

Initializing in your browser…

You might also like

QR Code Generator

Generate QR codes and check each one scans by decoding it back before you download it

Color Palette Generator

Build a colour harmony that holds its lightness by rotating hue in OKLCH, with the contrast of every pair, a perceptually even tint and shade ramp, and what a colour blind reader sees

Hash Generator

MD5, SHA-1, SHA-2 and CRC digests of text or a file, with HMAC and verification against a published digest

An example conversion

A retail system needs an EAN-13 barcode for a new product and you only have the 12-digit prefix, not the final check digit.

First 12 digits

012345678901
What Barcode Generator produces

EAN-13, with the numbers the tool reports

0123456789012   check digit 2 computed and appended
Bars read back off the image match ISO/IEC 15420 exactly
Quiet zone 23.0 modules left, 7.0 right, against 11 and 7 required

The 13th digit is a checksum: from the right of the twelve, every second digit is weighted three and the rest one, and the digit that takes the sum to the next multiple of ten is appended. Getting that right is the easy part. The part that decides whether a scanner reads the label is the quiet zone, which GS1 specifies in modules and asymmetrically for EAN: eleven on the left and seven on the right. A margin given in pixels is only correct at one bar width, and gets proportionally worse as the bars get wider. After drawing, the tool reads the bars back out of its own image and compares them against the pattern the standard gives for those digits, which is a check that shares nothing with the encoder that drew them.

What this converter does

Generate linear barcodes in more than a dozen symbologies, with the quiet zone each standard actually requires and a check that the bars drawn are the right bars. Check digits are computed when you leave them off and refused when they are wrong, and after drawing, the symbol is read back out of its own pixels and compared against the pattern the standard gives.

How it works

Two things decide whether a printed barcode reads, and neither is the encoder’s business.

The first is the quiet zone, the blank margin either side of the bars. Every standard specifies it in MODULES, not pixels, and for EAN it is asymmetric: the GS1 General Specifications require eleven modules on the left of an EAN-13 and seven on the right, seven and seven for EAN-8, nine and nine for UPC-A, and ISO/IEC 15417 and 16388 require ten each side for Code 128 and Code 39. A margin given in pixels is only correct at one bar width and gets proportionally worse as the bars get wider. The margin here is computed from the requirement for the symbology and the bar width in use, so it stays right at every size, and the panel states what it measured against what the standard asks for.

The second is the character set, and the failure there is a validator that accepts input the encoder then silently changes. Code 128 set A is ASCII 0 to 95, which includes the exclamation mark and the double quote; a validator built from a hand-written punctuation list will reject perfectly valid data. Code 39 has exactly 43 characters and no lower case, so lower case input is encoded in capitals and the page says so rather than letting you find out from a scanner. Code 128 set C and Interleaved 2 of 5 both encode digits in pairs, so an odd number of them cannot be encoded at all.

Check digits are computed with the GS1 modulo 10 rule: from the right of the data, every second digit is weighted three and the rest one, and the digit that takes the sum to the next multiple of ten is appended. Give twelve digits for an EAN-13 and the thirteenth is added and named; give thirteen with the wrong one and the code is refused with the right digit stated. UPC-E gets the same treatment through its expansion, because a UPC-E check digit is the check digit of the UPC-A it stands for and not of the six digits on the label, so it cannot be checked without expanding first; the expansion is shown, since that is what a scanner reports.

Then the symbol is read back. For EAN-13, EAN-8 and UPC-A the module patterns are known exactly from ISO/IEC 15420, so the bars are extracted from the pixels that were painted, normalised against the narrowest bar, and compared against the pattern those digits should produce. That is a check with nothing in common with the encoder that drew them, and it catches a symbol that is wrong for any reason at all rather than only the reasons someone thought of. The narrowest bar width and both quiet zones are reported in modules alongside it.

How to use

  1. 1Pick a symbology and type the data. The line underneath says exactly what will be encoded, including a check digit if one was added.
  2. 2If the input cannot be encoded, the message says which characters are outside the symbology and, where relevant, which set would take them.
  3. 3Read the panel under the preview: it reports the narrowest bar in pixels, both quiet zones in modules against what the standard requires, and whether the bars match the published pattern.
  4. 4Raise the bar width for print. The quiet zone scales with it, so the margins stay correct.
  5. 5Download as PNG or SVG, or use batch mode for a list.

Key features

  • Quiet zones computed from the requirement for the symbology and the bar width, asymmetric for EAN as GS1 specifies
  • The bars read back off the rendered image and compared against the ISO/IEC 15420 pattern for EAN-13, EAN-8 and UPC-A
  • The narrowest bar and both quiet zones reported in modules, against what the standard asks for
  • GS1 modulo 10 check digits computed when omitted and refused with the right value when wrong
  • UPC-E validated through its UPC-A expansion, which is where its check digit comes from, and the expansion shown
  • Character sets from the standards: Code 128 set A is ASCII 0 to 95, set B is 32 to 127, Code 39 is its own 43 characters
  • Lower case in Code 39 encoded in capitals with a note, rather than changed silently
  • A warning when the narrowest bar falls under two pixels
  • PNG and SVG output, and batch generation
  • Runs entirely in the browser

Where this fits

  • A retail label that has to scan at the till

    Enter twelve digits and let the check digit be computed, then read the quiet zone figures before sending it to print. That margin is the usual reason a label fails at the till.

  • Checking a code somebody sent you

    Paste the full number. A wrong check digit is refused with the correct one named, which is faster than finding out from a scanner.

  • Artwork for print

    Raise the bar width and the margins scale with it, so the quiet zone stays at the required number of modules rather than shrinking to nothing.

  • Working out why a scanner refuses a label

    The panel gives the narrowest bar in pixels and both margins in modules, which between them account for most unreadable labels.

Frequently asked questions

What is a quiet zone and why does it matter?

The blank margin either side of the bars. A scanner uses it to work out where the symbol starts and stops. It is specified in modules, so it has to grow with the bars; a fixed pixel margin is right at one size and wrong at every other.

Why is the left margin of my EAN-13 bigger than the right?

Because GS1 asks for eleven modules on the left and seven on the right. The left side has to leave room for the number system digit that sits outside the guard bars.

Why was my Code 39 input turned into capitals?

Code 39 has 43 characters and none of them are lower case. Rather than encode something different from what you typed without saying so, the tool encodes the capitals and tells you, so you know what a scanner will report.

My UPC-E check digit looks wrong but I copied it correctly.

A UPC-E check digit is the check digit of the UPC-A it expands to, not of the six digits printed on the label. The tool shows the expansion so you can see where the digit comes from.

Does the tool prove the barcode will scan?

It proves the bars match the pattern the standard gives for those digits, that the quiet zones meet the requirement, and that the narrowest bar is wide enough. That covers the reasons a generated symbol usually fails. It cannot account for how it is printed, so test the printed label.

Which symbology should I use?

EAN-13 or UPC-A for retail products, ITF-14 for a case or pallet, Code 128 for anything alphanumeric such as a tracking number, Code 39 where an old reader is involved. Code 128 is the densest of the general-purpose ones.

Further reading

  • Barcode Symbologies and the Math of Check Digits11 min read
  • QR Code Best Practices: Size, Error Correction, and Design Tips11 min read

Private by design

Conversions run on your device in JavaScript. The values you enter are never sent over the network.