Build test binaries from specs.
Spec to BIN is a browser-based tool for creating communication packets, embedded settings, EEPROM images, initialization BIN files, and test payloads from structured JSON templates.
It is not a general-purpose hex editor. The goal is to reduce manual hex editing by letting you define binary structure, edit values in a GUI, validate errors, preview bytes, and export .bin files.
- Runs locally in your browser.
- No upload of JSON templates, generated BIN files, field values, or specification-derived data.
- No telemetry.
- No built-in AI API integration.
- Release builds include a self-contained offline ZIP.
- Load and save JSON binary templates
- Edit names, types, sizes, formats, values, notes, and expected offsets in a table
- Reorder, add, duplicate, and delete fields
- Undo and redo edits, with unsaved-change warnings
- Show offsets and byte sizes
- Show field validation directly below the affected row
- Validate expected offsets against calculated offsets
- Preview generated hex bytes above the editor and highlight the selected field
- Switch the text preview between ASCII, UTF-8, and Shift_JIS without changing generated bytes
- Copy generated bytes as
0xlist, plain hex, C array, Pythonbytes, or C#byte[] - Save
.bin - English and Japanese UI
- System, light, and dark themes
- PWA and offline use
uint8uint16uint32uint64(JSON string value)int8int16int32int64(JSON string value)bytesstringipv4padding
The current release targets the latest stable versions of Google Chrome and Microsoft Edge. Other browsers may work, but are not part of the v0.1 test scope.
- CRC and checksum fields are not calculated automatically. Enter precomputed values as ordinary numeric or byte fields.
- Existing BIN files cannot be parsed back into templates.
- Repeat structures, variable-length structures, bit fields, floating-point fields, and conditional fields are not supported.
- The web/PWA build must be served over HTTP(S). Use the release ZIP when direct
file://and offline operation are required. - Preview and text-copy output are intentionally capped; larger valid binaries can still be saved within the generated-binary limit below.
npm install
npm run devnpm run builddist is the web/PWA build and must be served over HTTP(S). It is not intended to be opened directly with file://.
npm run build:offlineOpen dist-offline/index.html directly in a browser. The JavaScript and CSS are embedded in that one file. Tagged GitHub releases package this output as an offline ZIP.
npm run test:runThe editor starts with a blank template. Load a general-purpose sample from the reset menu, or use a JSON template such as:
{
"formatVersion": "0.1",
"name": "basic_fields",
"defaultEndian": "big",
"defaultEncoding": "utf-8",
"fields": [
{
"name": "unsignedValue",
"type": "uint16",
"offset": 0,
"value": "0x000F"
},
{
"name": "label",
"type": "string",
"offset": 2,
"length": 8,
"encoding": "utf-8",
"padding": "zero",
"value": "SAMPLE"
}
]
}More examples are available in examples.
- JSON file/editor input: 5 MiB
- Fields: 5,000
- One variable-size field: 16 MiB
- Generated binary: 64 MiB
- Hex preview: first 8 KiB
- Text copy formats: 64 KiB
Unknown JSON properties are preserved when possible and reported as warnings. Errors block preview, copy, and BIN export; warnings do not.
- User guide
- User guide (Japanese)
- Template format
- JSON Schema
- AI prompt example (English)
- AI prompt example (Japanese)
- Japanese README
These are intentionally outside the first version:
- Built-in AI API integration
- TCP/UDP send
- Existing BIN reverse parsing
- CRC/checksum
- repeat structures
- lengthOf/countOf/offsetOf auto fields
- batch generation
- CLI
- desktop executable
MIT


