LiteDB

active

by Mauricio David and the LiteDB community · since 2015 · also known as LiteDB .NET

Serverless single-file NoSQL document database for .NET, in the spirit of SQLite.

documentembedded libraryopen source (permissive)mature

Overview

LiteDB is an embedded document database written in C# that stores BSON documents in a single file. It offers ACID transactions, a write-ahead log, indexes on any expression, LINQ and a SQL-like query syntax, and optional AES encryption. It is the usual pick when a .NET desktop, tool or small service wants document storage without a native SQLite dependency or a separate server. The stable 5.0 line has not had a release since mid-2024, while a 6.0 rewrite has been in public prerelease and active development through 2026.

Strengths & trade-offs

Strengths

  • +Pure managed .NET, a single DLL with no native binaries
  • +ACID transactions with a write-ahead log
  • +Indexes on arbitrary expressions, including nested fields
  • +Password-based AES encryption of the data file

Trade-offs

  • −Stable 5.x branch has had no release since 2024 while 6.0 is still prerelease
  • −Not designed for heavy concurrent access from multiple processes
  • −No joins; references are resolved with Include()

Great for

  • +Desktop and WPF/WinForms app storage
  • +Configuration and state for .NET tools and services
  • +Unit-test databases and small prototypes

Think twice for

  • −Multi-process or networked access
  • −Large analytic datasets
  • −Non-.NET stacks

Capabilities

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

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

Scale & consistency

Comfortable data size
Small · ≤ 100 GB
Horizontal scaling
None
Multi-region
No
Transactions
Full ACID
Consistency
Strong
Schema
Schemaless
Architecture
Embedded
Query languages
LINQ, LiteDB SQL-like syntax (BsonExpression)

Single-file database for one process; suited to GB-scale local data.

Deployment

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

Ecosystem

apis & protocols.NET API
client languagesC#

Alternatives to LiteDB

Compare all→
SQLiteRelational75.5

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

litedb vs sqlite →
Realm (Atlas Device SDK)Object25.2

Object-oriented mobile database whose MongoDB sync service is gone; the local engine survives as open source.

litedb vs realm →
NeDBDocument13.3

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

litedb vs nedb →
SQLCipherRelational17.5

SQLite with transparent 256-bit AES encryption of the whole database file.

litedb vs sqlcipher →
ObjectBoxObject12.4

Fast on-device object database with built-in HNSW vector search and an optional commercial sync server.

litedb vs objectbox →
TinyDBDocument21.3

Pure-Python document store that keeps every table in one human-readable JSON file.

litedb vs tinydb →

LiteDB FAQ

What is LiteDB?

LiteDB is a document database by Mauricio David and the LiteDB community, first released in 2015. LiteDB is an embedded document database written in C# that stores BSON documents in a single file. It offers ACID transactions, a write-ahead log, indexes on any expression, LINQ and a SQL-like query syntax, and optional AES encryption. It is the usual pick when a .NET desktop, tool or small service wants document storage without a native SQLite dependency or a separate server. The stable 5.0 line has not had a release since mid-2024, while a 6.0 rewrite has been in public prerelease and active development through 2026.

Is LiteDB open source?

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

Does LiteDB support ACID transactions?

Yes. LiteDB supports full ACID transactions, with strong consistency.

Does LiteDB scale horizontally?

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

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

What is LiteDB best for?

LiteDB is a strong fit for desktop and WPF/WinForms app storage; configuration and state for .NET tools and services; and unit-test databases and small prototypes. Think twice for multi-process or networked access.

What are the best alternatives to LiteDB?

Common alternatives to LiteDB include SQLite, Realm (Atlas Device SDK), NeDB, SQLCipher and ObjectBox. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.

How popular is LiteDB?

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