random-access-idb

JSON →
library 1.2.2 ·javascript
verified Jun 7, 2026

random-access-idb is a browser-side storage library that implements the abstract-random-access interface using IndexedDB. Version 1.2.2 is the latest stable release. It provides a simple, file-like API for reading and writing binary data in the browser, with support for random access by offset. Unlike localStorage or other key-value stores, it is designed for use with libraries that expect a random-access storage backend, such as hypercore or dat. The library is lightweight and has no dependencies beyond the browser's IndexedDB API. It follows the random-access pattern where you open a database and then create named 'files' within it, each supporting read, write, and (optionally) del and stat operations. However, note that version 1.x does not support deletion or truncation, and changing the internal chunk size after writing data will corrupt existing data.