Why the format matters, not just the numbers#
A barcode format is not just a visual style — it is a specific encoding scheme with its own rules about what input is even valid. EAN-13, the format on most retail products, encodes exactly 13 digits, the last of which is a checksum computed from the other twelve; feeding it 10 digits or a value with an invalid check digit does not produce a barcode that scans as anything sensible. CODE128, by contrast, is much more permissive and can encode nearly any text or number, which is why it is the reasonable default when there is no specific standard to follow.
What each format actually expects#
EAN-13 needs 12 or 13 digits (the 13th, the check digit, is calculated automatically if left off). UPC-A needs 11 or 12 digits, following the same check-digit logic used across North American retail. CODE39 supports uppercase letters, digits, and a small set of symbols, commonly used in logistics and asset tagging. CODE128 is the most flexible of the four and the right choice whenever the destination system does not require one of the more specific retail standards.
Why an invalid value gets rejected instead of drawing something anyway#
A barcode that renders but does not actually decode back to the intended value is worse than an error message — it looks correct until someone tries to scan it. This tool validates the input against the selected format's real rules before drawing anything, so a mismatched value produces a clear explanation instead of a barcode that silently fails at the register or the warehouse scanner.