What this tool does
The barcode maker turns one value into one barcode symbol in one of six symbologies: Code 128, EAN-13, UPC-A, ISBN, Code 39, ITF-14. Before it draws anything, a small pure engine checks the value against the rules of the symbology you chose. Where the symbology carries a check digit (EAN-13, UPC-A, ISBN, ITF-14) the engine computes that digit from the data you typed or verifies the one you supplied; where it does not (Code 128 and Code 39) it checks the character set and the length. A second, independent pass re-verifies the payload about to be drawn; only when both agree does the preview appear, with a PNG and an SVG download of the same symbol.
The tool page’s mapping of formats to workflows stands, and a URL still belongs in a QR code. Every value, note, error and file name below comes from the engine or the tool’s own download helper at build time on a fixed input; the few sentences that are the tool’s interface wording rather than engine output are labelled as such, and the page carries no platform figure. The verified barcodes guide works the same rules through on fictional promo numbers, and the methodology sets them beside the rules of every other tool here.
The six symbologies and their input rules
Each symbology has a one-line input rule, shown under the data field as you type. The example is the value the tool loads when you pick that symbology; the last column is the payload the engine handed to the renderer for it at build time.
| Symbology | Input rule | Example | Rendered payload |
|---|
| Code 128 | Printable ASCII, 1–80 characters. | PROMO-2026-001 | PROMO-2026-001 |
| EAN-13 | 12 digits to compute the check digit, or 13 to verify it. | 4006381333931 | 4006381333931 |
| UPC-A | 11 digits to compute the check digit, or 12 to verify it. | 036000291452 | 036000291452 |
| ISBN | ISBN-10 or ISBN-13, with or without hyphens. | 978-0-306-40615-7 | 9780306406157 |
| Code 39 | A–Z, 0–9, space, and - . $ / + % only; 1–60 characters. | PART-4402 | PART-4402 |
| ITF-14 | 13 digits to compute the check digit, or 14 to verify it. | 09506000134352 | 09506000134352 |
The retail and carton formats accept two lengths each; the length decides whether the engine computes or verifies.
How a check digit is computed
EAN-13, UPC-A and ITF-14 share one check-digit routine, the engine’s gtinCheckDigit. It takes the data digits alone, weights each one according to its position counted from the right, sums the products, and returns the single digit that completes that sum to the next multiple of its modulus. The weights and the modulus are fixed inside the engine and are not restated here; what this page shows is what the routine returns. On the engine’s own EAN-13 example it records the twelve data digits 400638133393, returns the check digit 1, and hands the renderer the payload 4006381333931with the note “Check digit 1 was independently computed and appended.”
Every data digit enters that sum, so the check digit answers for all of them. With the first data digit raised from 4 to 5, the same routine returns 0 for 500638133393; with the first two data digits swapped it returns 3 for 040638133393. Both digits are the engine’s own output on those fixed inputs, recomputed on every build; the build fails if either ever coincides with the example’s digit.
The same routine on the UPC-A example without its final digit computes 2 and renders 036000291452; on the ITF-14 example it computes 2 and renders 09506000134352. The notes under the two previews name the digit the engine found: “Check digit 2 was independently computed and appended.” and “Check digit 2 was independently computed and appended.”
Verify or compute: the length of what you type decides
For the threeretail and carton formats the engine strips spaces and hyphens, refuses an empty value (“Enter the digits to encode.”), refuses anything that is not a digit, then counts what remains. The data length puts it in compute mode and the check digit is appended. The full length puts it in verify mode: the final digit you typed is compared with the routine’s; on the example the digit 1matches, so the note reads “Check digit 1 was independently verified.” Any other length is refused with the two lengths the symbology accepts — on 40063: “EAN-13 needs 12 digits or 13 digits; you entered 5.”
Verify mode never repairs a number: the example with its last digit changed, 4006381333932, is refused with “Check digit mismatch: the final digit must be 1, not 2.” Only you know whether the final digit or a data digit was mistyped, so the engine names both digits and refuses rather than substitutes.
Letters are refused even where they resemble digits — the UPC-A example with its first zero typed as the letter O, O36000291452, gets “UPC-A contains digits 0–9 only.”
ISBN: two forms, one symbol
The ISBN path accepts either form of a book number and always renders an EAN-13 symbol; the renderer receives the format EAN13. A thirteen-digit ISBN must begin like a book number — the fictional 1234567890128is refused with “An ISBN-13 must start with 978 or 979.” — and is then verified like any other EAN-13: on the engine’s example 978-0-306-40615-7 the final digit 7is verified: “ISBN-13 check digit 7 was independently verified.”
A ten-character ISBN uses a different check, with its own weights and its own modulus, both fixed inside the engine: its nine data digits are weighted by position, summed, and completed to a multiple of that modulus, and the one remainder that is not a single digit is written as the letter X. The engine verifies the check character you typed and refuses a mismatch, naming the character its routine produced: the test vector with its check character altered, 0-306-40615-3, is refused with “ISBN-10 check failed: the final character must be 2.” and the fictional 1-234-56789-X with a digit where its X belongs, 1-234-56789-0, is refused with “ISBN-10 check failed: the final character must be X.” With the X in place it is accepted and renders 9781234567897.
Once the character is verified, the engine prefixes the nine data digits with the book prefix 978— read back here from the data digits the engine recorded, not typed — and runs the retail routine on the result, so the check digit of the rendered symbol is 7, computed fresh rather than carried over. On the engine’s test vector 0-306-40615-2 the same book number therefore renders 9780306406157with the note “ISBN-10 0306406152 was verified and converted to Bookland ISBN-13.”
Code 128 and Code 39: character sets instead of check digits
The engine computes or verifies no check digit for either format; what it checks is the character set and the length: “Printable ASCII, 1–80 characters.” and “A–Z, 0–9, space, and - . $ / + % only; 1–60 characters.”
Code 128 accepts printable ASCII and nothing else here. The example PROMO-2026-001passes with “The encoder automatically chooses and switches Code 128 code sets.” An even count of digits, such as the fictional 20261001, passes with “Even-length numeric data will use compact Code Set C.” An accented letter, as in the fictional Café-2026, is refused with “Code 128 accepts printable ASCII characters in this tool.”
Code 39 is normalised before it is checked: trimmed, converted to upper case, then tested against its set. Typed in lower case as part-4402, the example renders PART-4402with the note “Lowercase letters were converted to uppercase for Code 39.” An underscore, as in PART_4402, is outside the set: “Code 39 supports A–Z, 0–9, space, and - . $ / + % only.”
Each format also has a length limit of the engine’s own, stated in its refusal. Over-long Code 39 input is refused as you type: “Code 39 is limited to 60 characters.” Over-long Code 128 input is refused with “Code 128 is limited to 80 characters.” As the tool’s interface currently stands, its data field is capped at the same length as the Code 128 rule, so that refusal is the one you are least likely to meet there; the rule itself is the engine’s and does not depend on the field.
The cross-check before anything is drawn
Before the renderer is called, the tool passes the finished payload through a second routine that re-verifies its final digit independently and compares the result with the check digit the first pass recorded. On the verified EAN-13 example that cross-check returns true; where the engine computed or verified no check digit there is nothing to re-verify, and on the Code 128 example it likewise returns true. If the two passes ever disagreed, the tool would withhold the barcode and say so beside the input: a digit about to be printed many times has been checked twice — once when it was computed or verified, and again on the finished payload about to be drawn.
How to read the output
The status line under the settings is the tool’s own wording, not the engine’s: where a check digit was computed or verified it names the digit and the mode — on the verified EAN-13 example, “Check digit 1 verified and re-verified.” — and where none applies it reads “Payload and character set verified.” The note under the preview is the engine’s own sentence for what it did. When the input is refused the preview is withdrawn and the panel reads, again in the tool’s wording, “Fix the input to generate a verified barcode.” while the engine’s reason replaces the status line.
The human-readable value under the bars is the rendered payload, not what you typed: a computed check digit appears in it, a converted ISBN in its thirteen-digit form, lower-case Code 39 in upper case. It can be switched off. The SVG download is the preview’s vector drawing, serialised; the PNG is the same drawing rasterised at a larger fixed scale. Both are named from the symbology and the payload — the verified EAN-13 example downloads as ean13-4006381333931.svg — and both keep the clear margin on each side, sized for the symbology. The colours you pick are the colours drawn, with no contrast check of the tool’s own.
Where the tool stops
- It checks arithmetic and character sets, nothing more. It has no registry, makes no lookup, and cannot tell whether a number is assigned, in use, or yours to print.
- It computes and draws; it does not read barcodes back. Whether a given print scans in a given setting is not something it measures.
- It renders one payload as one symbol in six symbologies. A web address belongs in the QR maker.
- It does not decide which format a workflow expects. The page’s one-line mapping is the extent of its advice; the system that will read the code is the authority.
Common misreadings
- “It will fix my check digit.” The full length puts the engine in verify mode, which refuses a mismatch rather than repairing it. To have the digit computed, leave it off.
- “The check passed, so the number is valid.” A pass means the final digit agrees with the others; it says nothing about where the number came from or whether it is registered.
- “An ISBN-10 is a different barcode.” Both forms of one book number render the same thirteen-digit payload, as the engine’s test vector shows.
Questions
- Why does the tool refuse my full number instead of correcting the last digit?
- The full length puts the engine in verify mode, which compares the digit you typed with the digit the routine produces and refuses a mismatch — for example "Check digit mismatch: the final digit must be 1, not 2." Only you know whether the final digit or a data digit was mistyped. To have the check digit computed and appended, enter the data digits alone.
- Which symbologies carry a check digit here, and which do not?
- EAN-13, UPC-A, ISBN, ITF-14 carry a check digit the engine computes or verifies. For Code 128 and Code 39 the engine computes or verifies no check digit; what it checks is the character set and the length, and the note describes what was checked or normalised, or how the encoder will choose its code sets, instead of naming a digit.
- Can I type spaces or hyphens in a retail number or an ISBN?
- Yes. They are removed before the digits are counted, so "4 006381 333931" renders 4006381333931 and "0-306-40615-2" renders 9780306406157. They are tolerated for typing, not encoded into the symbol.
- Why does my ISBN-10 come out as thirteen digits?
- Every ISBN is rendered as an EAN-13 symbol. A ten-character ISBN has its check character verified, then its nine data digits are prefixed with 978 and a fresh EAN-13 check digit is computed; the note reads "ISBN-10 0306406152 was verified and converted to Bookland ISBN-13." Both forms of the same number render the identical payload.
- Does a passing check digit mean the number is registered or belongs to me?
- No. The tool checks arithmetic and character sets only; it has no registry and makes no lookup. A pass means the final digit agrees with the other digits; whether a number is assigned, in use or yours to print is decided outside this tool.
- Why does Code 128 refuse an accented letter?
- In this tool Code 128 accepts printable ASCII only, so the fictional "Café-2026" is refused with "Code 128 accepts printable ASCII characters in this tool." The limit is the tool's own rule, stated in its error message. Use the plain-ASCII form of the character, or put the text in a QR code.
Everything here runs in your browser: the tools compute on your device and the Studio’s package is assembled on the device. The methodology documents every rule the tools apply.