json-record

Tamper-evident, hash-linked blocks for apps. Zero dependencies.

json-record stores arbitrary bytes and produces a JSON-compatible record describing the block. The payload itself is a Uint8Array and can contain any bytes: text, JSON, images, encrypted data, or custom binary formats. The "json" refers to the record structure, not the payload.

json-record is a tiny library for creating hash-linked blocks that detect any modification to payloads or history. It provides chronological integrity without keys, signatures, or complex state.

Why json-record exists

Local-first apps store data on the device and sync when possible. Without a server acting as the source of truth, you still need a way to know whether your local history has been tampered with. json-record provides a minimal, deterministic, tamper-evident structure for that purpose.

What json-record gives you that other tools do not

Databases, CRDTs, and sync engines track state, but they do not guarantee that the history of that state is intact. json-record provides a deterministic, hash-linked sequence of blocks that makes any deletion, insertion, or reordering immediately detectable. It is a portable, dependency-free integrity primitive that works in browsers, PWAs, mobile WebViews, and Node without servers, consensus protocols, or blockchain overhead.

Features