NeDB

deprecated

by Louis Chatriot (original); Seald (maintained fork) · since 2013 · also known as nedb, @seald-io/nedb

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

documentembedded libraryopen source (permissive)legacy

deprecated. Original author marked NeDB unmaintained (last release 1.8.0, 2016). Seald maintains a drop-in fork, @seald-io/nedb (v4.1.2, 2025).

Overview

NeDB is an embedded, persistent or in-memory datastore for Node.js, Electron and browsers, written in pure JavaScript with a subset of the MongoDB API: insert, find with query operators, update modifiers, indexes and TTL expiry. Data is kept in memory and persisted to an append-only file. It was hugely popular in the Electron era, but its author marked it unmaintained after the last release (1.8.0, 2016), warning of unpatched bugs and security issues. Seald maintains a compatible fork, @seald-io/nedb (v4.1.2, July 2025), and that fork is what anyone still using NeDB should install.

Strengths & trade-offs

Strengths

  • +MongoDB-style queries and updates with zero native dependencies
  • +Works in Node.js, Electron and browsers
  • +Indexes and TTL expiry built in
  • +Easy migration path to MongoDB later

Trade-offs

  • −Original package is unmaintained, with known unpatched issues
  • −Whole dataset must fit in memory
  • −Append-only file needs periodic compaction
  • −No multi-document transactions

Great for

  • +Legacy Electron or Node apps already using it (switch to the Seald fork)
  • +Small offline desktop tools

Think twice for

  • −New projects (use the fork, SQLite or PGlite)
  • −Large datasets or multi-process access

Capabilities

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

✓Secondary indexes
✓JSON
✓TTL / expiry
✓In-memory
✓Durable persistence
✓Online schema changes
–Transactions
–Joins
–Full-text search
–Vector search
–Geospatial
–Change data capture
–Triggers
–Stored procedures
–Materialized views
–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
Limited ACID
Consistency
Strong
Schema
Schemaless
Architecture
Embedded, In memory
Query languages
MongoDB-like query API (subset)

Entire dataset lives in memory; practical limit is tens of thousands to low millions of small documents.

Deployment

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

Ecosystem

apis & protocolsJavaScript API
client languagesJavaScript

Alternatives to NeDB

Compare all→
lowdbDocument19.1

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

nedb vs lowdb →
LokiJSDocument19.6

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

nedb vs lokijs →
SQLiteRelational75.5

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

nedb vs sqlite →
PouchDBDocument23.2

JavaScript database for browsers and Node that speaks the CouchDB replication protocol.

nedb vs pouchdb →
RxDBDocument20.2

Reactive local-first NoSQL database for JavaScript with pluggable storage and replication.

nedb vs rxdb →
PGliteRelational35.1

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

nedb vs pglite →

NeDB FAQ

What is NeDB?

NeDB is a document database by Louis Chatriot (original); Seald (maintained fork), first released in 2013. NeDB is an embedded, persistent or in-memory datastore for Node.js, Electron and browsers, written in pure JavaScript with a subset of the MongoDB API: insert, find with query operators, update modifiers, indexes and TTL expiry. Data is kept in memory and persisted to an append-only file. It was hugely popular in the Electron era, but its author marked it unmaintained after the last release (1.8.0, 2016), warning of unpatched bugs and security issues. Seald maintains a compatible fork, @seald-io/nedb (v4.1.2, July 2025), and that fork is what anyone still using NeDB should install.

Is NeDB open source?

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

Does NeDB support ACID transactions?

Partly. NeDB offers limited ACID guarantees (for example, single-record or single-partition transactions), with strong consistency.

Does NeDB scale horizontally?

NeDB 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 NeDB?

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

What is NeDB best for?

NeDB is a strong fit for legacy Electron or Node apps already using it (switch to the Seald fork) and small offline desktop tools. Think twice for new projects (use the fork, SQLite or PGlite).

What are the best alternatives to NeDB?

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

Is NeDB still maintained?

NeDB is deprecated. Original author marked NeDB unmaintained (last release 1.8.0, 2016). Seald maintains a drop-in fork, @seald-io/nedb (v4.1.2, 2025).

How popular is NeDB?

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