Nitrite
activeby Nitrite project (Anindya Chatterjee) · since 2017 · also known as Nitrite Database, NO2
Embedded NoSQL document store for Java and Android with pluggable MVStore or RocksDB storage.
Overview
Nitrite is an embedded, serverless document database for the JVM and Android, with a MongoDB-like API for collections of documents plus an object repository layer for plain Java and Kotlin objects. Storage is pluggable, using H2's MVStore or RocksDB, or pure in-memory. Version 4 rewrote the engine with transactions, and first-party modules add full-text indexes and spatial queries. The 4.x/5.x lines are actively released (5.4.2 in October 2026), and there is a separate Dart/Flutter port. It is a good fit for desktop and mobile JVM apps that want document storage without an external server.
Strengths & trade-offs
Strengths
- +Pure JVM, so it embeds anywhere Java or Kotlin runs, including Android
- +Choice of MVStore or RocksDB storage, or in-memory
- +Document collections and typed object repositories in one API
- +Built-in full-text and spatial indexing modules
Trade-offs
- −Small community with a single core maintainer
- −No replication or sync to a server
- −Breaking changes between major versions (3 to 4 to 5)
Great for
- +Desktop Java apps needing local document storage
- +Android apps preferring a document API over SQLite
- +Test fixtures and caches in JVM services
Think twice for
- −Multi-process or server workloads
- −Large datasets with concurrent writers
Capabilities
Native or official first-party support · 8 of 25 tracked
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
- Nitrite filter API (Java/Kotlin)
Deployment
Ecosystem
Alternatives to Nitrite
Fast on-device object database with built-in HNSW vector search and an optional commercial sync server.
nitrite vs objectbox →Object-oriented mobile database whose MongoDB sync service is gone; the local engine survives as open source.
nitrite vs realm →Embedded JSON document database with SQL++ queries, vector search and sync to Couchbase.
nitrite vs couchbase-lite →Fast pure-Java SQL engine for embedded, in-memory and test databases, with compatibility modes.
nitrite vs h2 →Embeddable JSON document database in C, with a JQL query language and optional HTTP/WebSocket server.
nitrite vs ejdb →Serverless single-file NoSQL document database for .NET, in the spirit of SQLite.
nitrite vs litedb →Nitrite FAQ
What is Nitrite?
Nitrite is a document database by Nitrite project (Anindya Chatterjee), first released in 2017. Nitrite is an embedded, serverless document database for the JVM and Android, with a MongoDB-like API for collections of documents plus an object repository layer for plain Java and Kotlin objects. Storage is pluggable, using H2's MVStore or RocksDB, or pure in-memory. Version 4 rewrote the engine with transactions, and first-party modules add full-text indexes and spatial queries. The 4.x/5.x lines are actively released (5.4.2 in October 2026), and there is a separate Dart/Flutter port. It is a good fit for desktop and mobile JVM apps that want document storage without an external server.
Is Nitrite open source?
Yes. Nitrite is open source. License: Apache License 2.0.
Does Nitrite support ACID transactions?
Partly. Nitrite offers limited ACID guarantees (for example, single-record or single-partition transactions), with strong consistency.
Does Nitrite scale horizontally?
Nitrite 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 Nitrite?
You can self-host it and embed it in your application.
What is Nitrite best for?
Nitrite is a strong fit for desktop Java apps needing local document storage; android apps preferring a document API over SQLite; and test fixtures and caches in JVM services. Think twice for multi-process or server workloads.
What are the best alternatives to Nitrite?
Common alternatives to Nitrite include ObjectBox, Realm (Atlas Device SDK), Couchbase Lite, H2 Database and EJDB. The right choice depends on your workload, scale and hosting; WhichDB's smart match ranks them against your requirements.
How popular is Nitrite?
Nitrite ranks #466 of 844 databases on the WhichDB Score (2.7/100), and #40 among document databases. The score combines public adoption signals such as package downloads, GitHub activity, job posts and developer discussion.



