Short answer
The best embedded databases are libraries that keep the data file inside the app, and most of them publish a license instead of a monthly price. SQLite is public domain. DuckDB, LiteDB, and SQL.js name MIT. RocksDB and the Chroma-style peers are separate. Berkeley DB uses AGPL for one download path and a commercial license for closed redistribution.
Last verified against the sources listed below.
Key takeaways
- SQLite's about page calls it an in-process library with the whole database in one file.
- DuckDB's site says the project is MIT licensed and can run in-process.
- LiteDB's site names the MIT license and says it is free for commercial use.
- RocksDB ships an Apache License 2.0 file. LevelDB's LICENSE does not use that name.
- ObjectBox says the core database is free and Data Sync is priced per project.
- Berkeley DB 18.1 from OTN is AGPL. Commercial terms are a separate Oracle license.
The best embedded databases are the ones you ship as a library and a file, not as a server the user has to install. This guide stays with projects whose own pages state a license or a price. A name is used only when that page uses it. Public domain, MIT, and Apache 2.0 are not guesses.
These engines still follow the idea of a relational database when they speak SQL. Others are ordered key-value libraries. Either way, the process that opens the file is your app.
Quick comparison
License and price notes are from the project or vendor page, as of December 2026.
| Tool | Best for | Starting price | Free plan or trial | Standout feature |
|---|---|---|---|---|
| SQLite | A single SQL file inside an app | Public domain | Yes, the library | Serverless, one disk file |
| DuckDB | Analytical SQL in-process | Free, MIT | Yes | Columns, Parquet, and SQL |
| LevelDB | An ordered key-value map | Free, see LICENSE | Yes | String keys to string values |
| RocksDB | An embeddable persistent key-value store | Free, Apache 2.0 | Yes | Apache License 2.0 file |
| LiteDB | A single-file store for .NET | Free, MIT | Yes | One DLL and a SQL-like language |
| Berkeley DB | Embedded key-value with a dual license | AGPL download, commercial if you need it | Open source path | SQL API via SQLite in the C product |
| SQL.js | SQLite in the browser | Free, MIT for sql.js | Yes | Runs in WebAssembly |
| ObjectBox | On-device objects, with optional sync | Core free | Sync trial is 30 days | Bindings are Apache 2.0 |
SQLite
SQLite is an in-process SQL database engine.
Best for: one SQL file shipped with the app.
- A complete database with tables, indexes, triggers, and views can live in a single file.
- The about page lists a maximum database size of 281 terabytes.
- With all features enabled, the library can be under 900 KiB, depending on the compiler.
The copyright page says the deliverable code is public domain and free for commercial or private use, as of December 2026. There is no monthly price. A paid Warranty of Title exists for teams that want a legal document.
Pros
- The license story is short: public domain for the library you ship.
- The file copies between 32-bit and 64-bit systems and between endianness.
Cons
- The project does not accept patches from people who have not signed a public domain affidavit.
- Very wide concurrency is not what the about page is selling. It compares SQLite to fopen, not to a big server.
DuckDB
DuckDB is an analytical SQL database that can run inside the same process as your app.
Best for: analytical SQL in the same process.
- The homepage calls it in-process, with a PostgreSQL-inspired SQL dialect.
- It lists clients for Python, Go, Java, Node.js, Rust, and others.
- It reads and writes Parquet, CSV, JSON, and Iceberg, locally or in object storage.
DuckDB’s site marks the license as MIT and the price as 0, as of December 2026. You still pay for the machine that runs the process.
Pros
- MIT is named on the project site, not inferred.
- Analytical queries can run next to the application code.
Cons
- It is aimed at analysis, not at being the only store for a high-churn mobile app.
- A client-server mode exists, so “embedded” is the in-process path, not every deployment.
LevelDB
LevelDB is a library from Google that maps string keys to string values in sorted order.
Best for: an ordered key-value file.
- Keys and values are strings, and the map stays ordered.
- The LICENSE allows source and binary redistribution when the notice stays with the copy.
- Google’s name may not be used to endorse a derived product without permission.
The license file is the price story: no fee is stated, and redistribution has conditions, as of December 2026. This guide does not rename that license.
Pros
- The data model is small: ordered keys and values.
- The LICENSE text is short enough to read before you ship.
Cons
- It is not a SQL database.
- You must keep the copyright notice with redistributed copies.
RocksDB
RocksDB is a library for an embeddable, persistent key-value store.
Best for: a persistent key-value library.
- The Apache license text grants use without a charge, with the usual notice rules.
- The project is published as source you build yourself.
- It is a library, not a database server you log into.
The Apache license file is the grant, as of December 2026. There is no RocksDB subscription on that page.
Pros
- The license name is in the file: Apache License 2.0.
- You can embed it instead of running a separate database process.
Cons
- You operate compaction, backups, and upgrades yourself.
- SQL queries are not part of the repository description.
LiteDB
LiteDB is a serverless document database for .NET, shipped as a single DLL.
Best for: one data file for .NET apps.
- The site says it is ACID, with a single data file, similar to SQLite.
- It supports a SQL-like language and LINQ queries.
- It can store files and streams inside the database.
The LiteDB site states that license and the free commercial use line, as of December 2026. There is no paid database tier on the page.
Pros
- MIT and commercial use are both written on the project page.
- One file is an easy thing to copy with the app.
Cons
- It targets .NET, not every language.
- The site still mentions older framework versions, so check the NuGet package you install.
Berkeley DB
Oracle Berkeley DB is a family of embedded key-value libraries.
Best for: embedded storage with a dual license.
- The C library offers BTREE, HASH, QUEUE, and RECNO storage.
- There is a Java Edition shipped as a JAR.
- OTN downloads from the 18.1 releases are under AGPL version 3.
Oracle’s licensing page says the open source license permits use at no charge under its conditions, as of December 2026. The commercial license has no public dollar price. Treat that path as custom pricing, see vendor.
Pros
- A no-charge open source path is documented.
- SQL is available in the C product through SQLite.
Cons
- Giving the app to customers can trigger source-release duties under the open source terms.
- The commercial price is not printed.
SQL.js
SQL.js compiles SQLite to WebAssembly so a relational database can run in the browser.
Best for: SQLite running in the browser.
- You create a database with SQL.Database after an async init.
- You can import an existing SQLite file from a byte array and export one back.
- The site says SQLite is public domain and sql.js is MIT licensed.
The sql.js site states both licenses, as of December 2026. There is no paid plan. The page also says a native SQLite binding is a better fit for a desktop app that must keep a large file on disk.
Pros
- MIT for the JavaScript wrapper is stated on the site.
- The database never has to leave the browser.
Cons
- The default database is in memory, so a refresh drops it unless you export.
- Large files are a poor fit because the whole database is loaded.
ObjectBox
ObjectBox is an on-device database for mobile, IoT, and other embedded devices.
Best for: on-device objects, sync optional.
- The FAQ says the core database will always be free to use.
- Language bindings are Apache 2.0. The native library uses the ObjectBox Binary License.
- Data Sync is the paid product, priced per project.
The ObjectBox FAQ and the sync pricing page state that split, as of December 2026. No dollar amount is printed for Sync. That part is custom pricing, see vendor. The local database is the free piece.
Pros
- The free core and the paid sync product are separated in writing.
- Bindings for several languages are named as Apache 2.0.
Cons
- The native binary is under the ObjectBox Binary License, not Apache 2.0.
- Sync cost depends on a sales conversation.
How to choose an embedded database
Pick the engine that matches the file you will actually ship.
- Choose SQLite or SQL.js when the data is relational and you want one file or a browser copy of that file.
- Choose DuckDB when the job is analysis over columns and files, not a tiny mobile record.
- Choose LevelDB or RocksDB when you want ordered keys and you will not write SQL.
- Keep sync and the local engine separate. A free local store can still have a paid network product.
- If you are writing the schema notes by hand, the Word Counter keeps the comment short.
How we picked these tools
The list comes from project sites, license files, and Oracle’s licensing page.
SQLite, DuckDB, LevelDB, RocksDB, LiteDB, Berkeley DB, SQL.js, and ObjectBox each had a page that stated a license or a price rule. A license name appears only when that page uses it. LevelDB is described from its LICENSE text instead of a nickname the file does not use. Products whose sites did not state a license were not given one.
Frequently asked questions
Does SQLite charge for commercial apps?
The copyright page says anyone may copy, modify, publish, use, compile, sell, or distribute the SQLite code for any purpose, commercial or not. It also says the deliverable library is public domain. Hwaci sells an optional Warranty of Title for organizations that want a signed document. The about page still says the source is free. Build scripts can sit under other licenses, and those scripts are not part of the shipped library.
Is DuckDB only an in-memory tool?
The DuckDB site describes an analytical SQL database that can run in-process, from edge devices to large servers, and that reads and writes files such as CSV, JSON, and Parquet. It also names a client-server protocol called Quack, so a remote DuckDB can sit beside the in-process library. The homepage schema marks the license as MIT and the offer price as 0. The same page announced the 2.0.1 patch. Persistence is a file you choose, not a hosted account.
What license applies if I ship LevelDB inside an app?
The LevelDB LICENSE file allows redistribution in source and binary form if you keep the copyright notice, the conditions, and the disclaimer. It also says you may not use Google's name to endorse a derived product without written permission. The file does not label itself MIT, Apache, or public domain, so this guide does not assign one of those names. There is no price on the repository page. You still have to ship the notice with the binary.
Can I use Berkeley DB in a closed-source app I give to customers?
Oracle's licensing page says the open source terms allow use at no charge when you do not redistribute the application to third parties, or when the complete application source is available and freely redistributable. If you do not want to release that source, you buy a commercial license. Starting with 18.1, OTN packages are AGPL version 3, and packages from the Oracle Software Data Cloud use the Oracle Master Agreement. The public pages do not print a dollar price for the commercial license.
Does ObjectBox Data Sync have a public price?
The sync pricing page says ObjectBox prices Data Sync per project, based on usage, the business model, and support. It does not print a dollar amount. The FAQ says the core database will always be free to use, language bindings are Apache 2.0, and the native library uses the ObjectBox Binary License. A 30-day sync trial is described for a standalone server image. If you only need the local database, the FAQ says you do not have to buy Sync.
Sources
- SQLite copyright · SQLite, 2026
- About SQLite · SQLite, 2026
- DuckDB · DuckDB, 2026
- LevelDB LICENSE · LevelDB Authors, 2026
- RocksDB Apache license · RocksDB, 2026
- LiteDB · LiteDB, 2026
- Oracle Berkeley DB licensing · Oracle, 2026
- sql.js · sql.js, 2026
- ObjectBox FAQ · ObjectBox, 2026