lowdb

maintenance

by typicode · since 2014

Tiny type-safe local JSON database for Node, Electron and the browser using plain JavaScript.

documentembedded libraryopen source (permissive)mature

maintenance. Feature-complete; no release since v7.0.1 (Dec 2023), with only occasional maintenance commits.

Overview

lowdb is a minimal library that loads a JSON file (or localStorage) into memory as a plain JavaScript object, lets you mutate it with ordinary array and object methods, and writes it back atomically. With TypeScript it gives typed access to the data and has no query language to learn. It is popular for prototypes, CLIs, Electron apps, small demos and test fixtures, and underpins tools like json-server. The library is effectively feature-complete: v7.0.1 (December 2023) is the latest release, with only occasional maintenance commits since. It is not a database in the transactional sense and should not be used for concurrent multi-process writes.

Strengths & trade-offs

Strengths

  • +Zero learning curve: data is just a JavaScript object
  • +Type-safe with TypeScript generics
  • +Atomic file writes and pluggable adapters, including browser localStorage
  • +Tiny dependency footprint

Trade-offs

  • −Loads the entire dataset into memory
  • −No indexes, queries or transactions
  • −Unsafe for concurrent writers across processes

Great for

  • +Prototypes and hackathon backends
  • +CLI tool and Electron app settings
  • +Mock APIs and test fixtures

Think twice for

  • −Production multi-user apps
  • −Datasets larger than a few megabytes
  • −Concurrent access from multiple processes

Capabilities

Native or official first-party support · 4 of 25 tracked

✓JSON
✓In-memory
✓Durable persistence
✓Online schema changes
–Transactions
–Joins
–Secondary indexes
–Full-text search
–Vector search
–Geospatial
–Change data capture
–Triggers
–Stored procedures
–Materialized views
–TTL / expiry
–Pub/Sub
–Columnar storage
–Compression
–Encryption at rest
–Role-based access
–Time travel
–Branching
–Streaming ingest
–Offline sync
–Runs in WebAssembly

Scale & consistency

Comfortable data size
Small · ≤ 100 GB
Horizontal scaling
None
Multi-region
No
Transactions
None
Consistency
Strong
Schema
Schemaless
Architecture
Embedded, In memory
Query languages
JavaScript (native array/object methods)

Whole dataset is held in memory and rewritten on each save; practical up to a few MB.

Deployment

Self-hosted Vendor-managed cloud Serverless Embedded Edge Kubernetes operator

Ecosystem

apis & protocolsJavaScript API, Adapters (JSONFile, LocalStorage, Memory)
client languagesJavaScript, TypeScript

Alternatives to lowdb

Compare all→
NeDBDocument13.3

Pure-JavaScript embedded datastore with a MongoDB-like API; the original is unmaintained.

lowdb vs nedb →
SQLiteRelational75.5

The in-process SQL engine that ships in every phone, browser and OS: one file, zero servers.

lowdb vs sqlite →
PGliteRelational35.1

Real PostgreSQL compiled to WebAssembly: an embeddable Postgres for browsers, Node, Bun and Deno.

lowdb vs pglite →
LokiJSDocument19.6

In-memory JavaScript document store with indexes and pluggable persistence; no longer maintained.

lowdb vs lokijs →
TinyBaseKey-Value18.4

Tiny reactive in-memory store for tables and values, with persisters and CRDT sync.

lowdb vs tinybase →
Dexie.jsDocument25.8

The most popular IndexedDB wrapper, with live queries and an optional Dexie Cloud sync service.

lowdb vs dexie →

lowdb FAQ

What is lowdb?

lowdb is a document database by typicode, first released in 2014. lowdb is a minimal library that loads a JSON file (or localStorage) into memory as a plain JavaScript object, lets you mutate it with ordinary array and object methods, and writes it back atomically. With TypeScript it gives typed access to the data and has no query language to learn. It is popular for prototypes, CLIs, Electron apps, small demos and test fixtures, and underpins tools like json-server. The library is effectively feature-complete: v7.0.1 (December 2023) is the latest release, with only occasional maintenance commits since. It is not a database in the transactional sense and should not be used for concurrent multi-process writes.

Is lowdb open source?

Yes. lowdb is open source. License: MIT License.

Does lowdb support ACID transactions?

No. lowdb does not provide ACID transactions; its consistency model is strong.

Does lowdb scale horizontally?

lowdb does not scale horizontally; it runs on a single node, so you scale it up rather than out. It is comfortable at small scale (≤ 100 GB).

How can I run lowdb?

You can self-host it and embed it in your application.

What is lowdb best for?

lowdb is a strong fit for prototypes and hackathon backends; CLI tool and Electron app settings; and mock APIs and test fixtures. Think twice for production multi-user apps.

What are the best alternatives to lowdb?

Common alternatives to lowdb include NeDB, SQLite, PGlite, LokiJS and TinyBase. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

Is lowdb still maintained?

lowdb is in maintenance mode. Feature-complete; no release since v7.0.1 (Dec 2023), with only occasional maintenance commits.

How popular is lowdb?

lowdb ranks #174 of 844 databases on the WhichDB Score (19.1/100), and #21 among document databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.