A simple, type-safe local JSON database for Node.js and browsers using plain JavaScript.
lowdb is a simple, type-safe local JSON database for Node.js and browsers. It enables developers to read and write JSON files using plain JavaScript, solving the need for lightweight data persistence without the overhead of a full database system. It's designed for small-scale applications, prototypes, and configuration management.
Developers working on small projects, prototypes, or tools that require simple data storage without setting up a database server. It's also suitable for frontend developers needing browser-based storage solutions.
Developers choose lowdb for its minimal API, type safety with TypeScript, and flexibility through adapters. It eliminates complexity by using familiar JavaScript patterns, making it easy to integrate and extend for custom use cases.
Simple and fast JSON database
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses plain JavaScript arrays and objects for data manipulation, making it intuitive for developers familiar with JS, as shown in examples using native array methods like filter and toSorted.
Provides full type safety for data structures, preventing type errors at compile time, as demonstrated in the TypeScript example where pushing a number to a string array causes an error.
Supports custom adapters for JSON, YAML, encryption, or in-memory storage, allowing easy customization, such as using DataFile with YAML parsing for different file formats.
Ensures safe file operations with automatic write management, reducing the risk of data corruption when updating JSON files, as highlighted in the API section with db.write().
Serializes the entire dataset on every write, leading to slowdowns with large objects (~10-100MB), as admitted in the limits section, making it inefficient for high-volume operations.
Relies solely on native array methods, lacking optimized queries, indexing, or transactions, which can become cumbersome for complex data retrieval compared to full databases.
File-based storage and lack of Node cluster module support make it unsuitable for multi-user or high-concurrency scenarios, restricting scalability beyond single-user applications.