Barcode Generator
Similar tools
- Quick Response (QR) Code Generator Create a QR code for links and common actions with payload-capacity and contrast checks plus quiet-zone, logo, and scan-readiness guidance.
- QR Batch Generator Generate named QR images from pasted rows or CSV/TXT files, then catch capacity and scan-readiness risks before downloading the batch.
- QR Code Decoder Decode a QR image locally, inspect the recovered payload, and flag suspicious links or sensitive OTP and Wi-Fi data before opening.
- QR Label Sheet Generator Create printable QR label sheets from CSV or text rows with stock presets and placement planning plus density warnings and local processing.
A scan succeeds only when the encoded value, bar pattern, blank margins, contrast, and printed size all survive the trip from artwork to label to scanner. A barcode can look convincing on a screen and still fail after scaling, low-quality printing, glare, trimming, or quiet-zone intrusion.
Linear barcode formats divide that job in different ways. Code 128 is compact for mixed letters, numbers, and punctuation. Code 39 uses a smaller uppercase character set that remains common on asset and industrial labels. EAN-13 and UPC-A carry fixed-length retail identifiers whose final digit checks whether the preceding digits were entered consistently.
| Format | Useful for | Important constraint |
|---|---|---|
| Code 128 | Internal identifiers, shipment labels, and mixed text | Printable ASCII only |
| EAN-13 | Thirteen-digit retail trade item numbers | 12 body digits plus one check digit |
| UPC-A | Twelve-digit retail trade item numbers | 11 body digits plus one check digit |
| Code 39 | Restricted uppercase asset and inventory labels | Letters, digits, spaces, and . $ / + % - |
The check digit catches many typing errors, but it does not prove that a number was assigned by GS1, belongs to a particular product, or is active in a trading system. Likewise, a screen preview is not a print-quality certificate. Final retail or operational labels should be printed at the intended size and verified with the applicable specification and real scanning equipment.
How to Use This Tool:
Choose the symbology from the identifier you must encode, then size the artwork for the actual label rather than the screen preview.
- Select Barcode format and enter the payload in Data to encode. For EAN-13, use 12 body digits or a complete 13-digit value; for UPC-A, use 11 or 12 digits.
- Choose Check digit handling for a retail code. Auto appends a missing digit and validates a complete value, Require accepts only a complete valid value, and Recalculate replaces the final digit from the body.
- Set Narrow bar width, Bar height, Quiet margin, and the bar and background colors. Keep dark bars on a light background unless a verified production process supports another combination.
- Enter Printed module width and Usable label width from the intended print layout. Exclude captions, page margins, and neighboring artwork from the usable width.
- Review Barcode artwork and Validation ledger. Use Print size sweep to compare full artwork widths as planned printed module width changes, checking where the artwork meets the usable-label width. Resolve invalid digits and any quiet-zone or fit warning, then test the final-size print with the scanner that will be used.
Interpreting Results:
Read the Validation ledger before relying on the readiness score. A valid payload and check digit settle the data-format question; the quiet-zone, contrast, and print-fit rows are planning checks for the proposed artwork.
Ready begins at 85, Review at 70, At risk at 45, and Blocked below 45. These labels summarize a repository-authored heuristic. A high score cannot detect ink spread, printer resolution, substrate reflectance, curvature, damage, scanner optics, or an incorrect official product assignment.
Technical Details:
A linear barcode represents data as alternating bars and spaces measured in modules. Retail EAN/UPC symbols have fixed encodation patterns, while Code 128 and Code 39 grow with the payload. Blank quiet zones on both sides let a scanner distinguish the symbol from nearby marks.
Rule Core
Payload normalization happens before artwork sizing. Code 39 letters are converted to uppercase. Retail values use the GS1 modulo-10 check-digit rule, applied from the rightmost body digit with alternating weights of 3 and 1.
Here, d is a body digit and w is 3, 1, 3, 1 in alternating order from the right. Require rejects a missing or incorrect final digit. Auto computes a missing digit but rejects an incorrect supplied one. Recalculate computes the final digit from the body even when a different digit was supplied.
| Format | Accepted input | Normalization or validation |
|---|---|---|
| Code 128 | 1 to 96 printable ASCII characters | No GTIN check digit; values longer than 80 characters receive a compact-label warning |
| Code 39 | 1 to 96 supported characters | Lowercase becomes uppercase; values longer than 48 characters receive a compact-label warning |
| EAN-13 | 12 or 13 digits | Computes or validates the thirteenth digit |
| UPC-A | 11 or 12 digits | Computes or validates the twelfth digit |
Formula Core
The print-width estimate combines an approximate content-module count with the configured blank margin on both sides. The browser margin is measured in pixels, so dividing it by the narrow-bar pixel width converts it to module equivalents.
Q is Quiet margin in pixels, B is Narrow bar width in pixels, X is Printed module width in millimetres, and W is the estimated width in millimetres. EAN-13 and UPC-A use 95 content modules. The Code 39 estimate is 25 + 13 per character; the Code 128 estimate is 35 + 12 per character. These latter counts are planning approximations, not complete symbology encoders.
The base Print size sweep spans 0.264–0.660 mm for EAN-13 and UPC-A, or a tool-authored planning range of 0.18–0.80 mm for Code 128 and Code 39. These comparison ranges do not add input limits or prove compliance. The entered module width is also included when it falls outside the base sweep, and the modelled usable-label crossing is included when it falls within the base range.
The quiet-margin planning target is the greater of 12 pixels or 11 narrow-bar widths for EAN-13 and UPC-A, and the greater of 12 pixels or 10 narrow-bar widths for Code 128 and Code 39. It deliberately reduces several format-specific requirements to one conservative browser check; consult the applicable symbology specification for production dimensions.
The readiness score is a weighted combination of five 0-to-100 subscores. Payload validity contributes 30%, check-digit handling 20%, quiet margin 18%, screen-color contrast 17%, and print fit 15%.
A recalculated retail check digit scores 90 rather than 100. Quiet-zone credit grows proportionally to the planning target. Print fit scores 100 at no more than 90% of available width, 95 through 100%, 75 through 115%, 55 through 135%, and 25 above 135%.
Color contrast uses the WCAG relative-luminance equation as a screen-color proxy. Ratios at or above 7:1 receive full credit; ratios from 4.5:1 to 7:1 scale from 75 to 100, and lower ratios scale from 0 to 75. WCAG contrast describes visual text contrast, not barcode scanner performance.
Limitations:
Generation and planning checks happen in the browser, but the result is still artwork rather than verified packaging.
- The readiness score is a planning heuristic, not an ISO/IEC or GS1 conformance grade.
- Screen pixels and the entered module width do not prove the physical dimensions produced by a printer or design application.
- A correct check digit confirms internal consistency only; it does not assign or authenticate a GTIN.
- Always test the final substrate, size, colors, print process, placement, and scanner population.
Worked Examples:
Completing a UPC-A value
Enter the 11-digit body 03600029145 with Auto selected. Alternating 3 and 1 weights produce the check digit 2, so the encoded value becomes 036000291452. Keep the human-readable digits visible, check the estimated width against the usable label area, and scan a final-size print before release.
References:
- GS1 General Specifications, GS1, Release 26.0, January 2026.
- Check Digit Calculator, GS1 US.
- Web Content Accessibility Guidelines (WCAG) 2.2, World Wide Web Consortium, October 2023.