LiteDB
activeby 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.
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
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
Ecosystem
Alternatives to LiteDB
The in-process SQL engine that ships in every phone, browser and OS: one file, zero servers.
litedb vs sqlite →Object-oriented mobile database whose MongoDB sync service is gone; the local engine survives as open source.
litedb vs realm →Pure-JavaScript embedded datastore with a MongoDB-like API; the original is unmaintained.
litedb vs nedb →SQLite with transparent 256-bit AES encryption of the whole database file.
litedb vs sqlcipher →Fast on-device object database with built-in HNSW vector search and an optional commercial sync server.
litedb vs objectbox →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.