Description
Generate seeded synthetic EAN-13 or UPC-A data under an optional digit prefix, delegate check digits and SVG symbols, and return bounded zero-based label-grid positions for an app-rendered sheet; optional uniqueness applies to identifiers, while assignment, physical scanner readiness, print layout and export are not claimed.
A protocol fixture is local test data representing headers, messages, identifiers, or request decisions. Serialization and parsing can be checked without contacting a server, while authentication, delivery, and actual client behavior require separate tests.
Generate seeded synthetic EAN-13 or UPC-A data under an optional digit prefix, delegate check digits and SVG symbols, and return bounded zero-based label-grid positions for an app-rendered sheet; optional uniqueness applies to identifiers, while assignment, physical scanner readiness, print layout and export are not claimed.
When to use this tool
Use this generator to create reproducible barcode label sheet cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.
How to use the tool and how it works
- Supply format, prefix, count, unique, columns, scale, heightMillimeters, includeText in the field shapes below. Set seed when you need an explicit replay.
- Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
- Read grid, labels. Use the conventions below. Keep answer-bearing fields separate when presenting an exercise.
Sample decimal suffixes under a supplied prefix, append a delegated EAN-13 or UPC-A check digit, and generate actual barcode images. Arrange labels in zero-based grid positions and return identifiers, data digits, and check digits.1
Delegated operations used for this result: ean 13; upc a. Their calculation or parsing conventions apply to the corresponding result fields.2, 3
| Input field | Meaning and units | Accepted input |
|---|---|---|
| format | Format | Required. Text; one of "ean13", "upca". |
| prefix | Prefix | Required. Text; maximum UTF-16 length 12. |
| count | Count | Required. Safe integer; minimum 1; maximum 64. |
| unique | Unique | Required. Boolean. |
| columns | Columns | Required. Safe integer; minimum 1; maximum 8. |
| scale | Scale | Required. Safe integer; minimum 1; maximum 10. |
| heightMillimeters | Height Millimeters | Required. Finite number; minimum 1; maximum 100. |
| includeText | Include Text | Required. Boolean. |
| seed | Optional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed. | Optional. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| grid | Grid | Required. Object; no unknown keys. |
| grid.columns | Columns | Required. Safe integer; minimum 1; maximum 8. |
| grid.rows | Rows | Required. Safe integer; minimum 1; maximum 64. |
| labels | Labels | Required. Array of Object; no unknown keys.; minimum items 1; maximum items 64. |
| labels[].row | Row | Required. Safe integer; minimum 0; maximum 63. |
| labels[].column | Column | Required. Safe integer; minimum 0; maximum 7. |
| labels[].dataDigits | Data Digits | Required. Text; minimum UTF-16 length 11; maximum UTF-16 length 12. |
| labels[].identifier | Identifier | Required. Text; minimum UTF-16 length 12; maximum UTF-16 length 13. |
| labels[].checkDigit | Check Digit | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 1. |
| labels[].barcode | Barcode | Required. Object; no unknown keys. |
| labels[].barcode.bcid | Bcid | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 64. |
| labels[].barcode.symbology | Symbology | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 128. |
| labels[].barcode.svg | Svg | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 1000000. |
| labels[].barcode.width | Width | Required. Finite number; strictly above 0. |
| labels[].barcode.height | Height | Required. Finite number; strictly above 0. |
| randomness | Replay source and normalized 32-bit seed, or null seed for an advancing context source. | Required. Object; no unknown keys. |
| randomness.seed | Optional safe-integer replay seed; normalization and precedence are explained below. | Required. Safe integer. or Null. |
| randomness.source | Source | Required. Text; one of "context", "seed". |
An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.
{
"input": {
"format": "ean13",
"prefix": "400",
"count": 2,
"unique": true,
"columns": 2,
"scale": 1,
"heightMillimeters": 12,
"includeText": false,
"seed": 42
},
"output": {
"grid": {
"columns": 2,
"rows": 1
},
"labels": [
{
"row": 0,
"column": 0,
"dataDigits": "400601103751",
"identifier": "4006011037512",
"checkDigit": "2",
"barcode": {
"bcid": "ean13",
"height": 52,
"svg": "<svg viewBox=\"0 0 112 52\" xmlns=\"http://www.w3.org/2000/svg\">\n<rect width=\"100%\" height=\"100%\" fill=\"#ffffff\" />\n<path stroke=\"#000000\" stroke-width=\"1\" d=\"M4.50 39L4.50 4M6.50 39L6.50 4M13.50 39L13.50 4M15.50 39L15.50 4M22.50 39L22.50 4M34.50 39L34.50 4M50.50 39L50.50 4M52.50 39L52.50 4M59.50 39L59.50 4M61.50 39L61.50 4M66.50 39L66.50 4M68.50 39L68.50 4M72.50 39L72.50 4M75.50 39L75.50 4M96.50 39L96.50 4M98.50 39L98.50 4\" />\n<path stroke=\"#000000\" stroke-width=\"2\" d=\"M11 39L11 4M32 39L32 4M37 39L37 4M41 39L41 4M44 39L44 4M48 39L48 4M83 39L83 4M87 39L87 4M90 39L90 4M93 39L93 4\" />\n<path stroke=\"#000000\" stroke-width=\"3\" d=\"M19.50 39L19.50 4M55.50 39L55.50 4M79.50 39L79.50 4\" />\n<path stroke=\"#000000\" stroke-width=\"4\" d=\"M26 39L26 4\" />\n<path d=\"M106.89 42.77L101.71 46.06Q101.57 46.16 101.39 46.16Q101.16 46.16 100.99 46.00Q100.82 45.83 100.82 45.61Q100.82 45.40 100.99 45.23L105.43 42.38L100.99 39.54Q100.82 39.43 100.82 39.15Q100.82 38.93 100.99 38.77Q101.16 38.60 101.39 38.60Q101.57 38.60 101.71 38.70Q101.71 38.70 101.71 38.70L106.89 41.99Q107.06 42.19 107.06 42.39Q107.06 42.61 106.89 42.77Z\" fill=\"#000000\" />\n</svg>\n",
"symbology": "EAN-13",
"width": 112
}
},
{
"row": 0,
"column": 1,
"dataDigits": "400448290558",
"identifier": "4004482905583",
"checkDigit": "3",
"barcode": {
"bcid": "ean13",
"height": 52,
"svg": "<svg viewBox=\"0 0 112 52\" xmlns=\"http://www.w3.org/2000/svg\">\n<rect width=\"100%\" height=\"100%\" fill=\"#ffffff\" />\n<path stroke=\"#000000\" stroke-width=\"1\" d=\"M4.50 39L4.50 4M6.50 39L6.50 4M13.50 39L13.50 4M15.50 39L15.50 4M22.50 39L22.50 4M29.50 39L29.50 4M38.50 39L38.50 4M41.50 39L41.50 4M50.50 39L50.50 4M52.50 39L52.50 4M58.50 39L58.50 4M66.50 39L66.50 4M68.50 39L68.50 4M75.50 39L75.50 4M82.50 39L82.50 4M85.50 39L85.50 4M89.50 39L89.50 4M94.50 39L94.50 4M96.50 39L96.50 4M98.50 39L98.50 4\" />\n<path stroke=\"#000000\" stroke-width=\"2\" d=\"M11 39L11 4M27 39L27 4M34 39L34 4M45 39L45 4M48 39L48 4\" />\n<path stroke=\"#000000\" stroke-width=\"3\" d=\"M19.50 39L19.50 4M55.50 39L55.50 4M62.50 39L62.50 4M72.50 39L72.50 4M79.50 39L79.50 4\" />\n<path d=\"M106.89 42.77L101.71 46.06Q101.57 46.16 101.39 46.16Q101.16 46.16 100.99 46.00Q100.82 45.83 100.82 45.61Q100.82 45.40 100.99 45.23L105.43 42.38L100.99 39.54Q100.82 39.43 100.82 39.15Q100.82 38.93 100.99 38.77Q101.16 38.60 101.39 38.60Q101.57 38.60 101.71 38.70Q101.71 38.70 101.71 38.70L106.89 41.99Q107.06 42.19 107.06 42.39Q107.06 42.61 106.89 42.77Z\" fill=\"#000000\" />\n</svg>\n",
"symbology": "EAN-13",
"width": 112
}
}
],
"randomness": {
"seed": 42,
"source": "seed"
}
}
} Limitations and assumptions
- Unique applies to generated payloads within this sheet, not globally issued identifiers. A valid checksum does not establish GS1 registration, product authenticity, or real-world ownership. Aggregate image size and payload population are bounded.
- A replay requires the same complete input and implementation. The stated sampling convention applies within its eligible space. A finite draw does not exhaust all possible outputs; repeats remain possible unless a distinct-selection rule is explicit.
- The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.
Alternative or Complementary methods
For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.
References
Similar or alternative tools
- Random CSS Custom Property Fallback Corpus Generator
Compose nested var fallback expressions and literal bindings, then lower their acyclic fallback paths to the supported core resolver.
- Random Custom Element Name Fixture Generator
Construct names from caller-supplied ASCII parts and controlled dash-removal, uppercase and reserved-name mutations, retaining current core flags without registering elements.