H2 Database Engine

H2 is an open-source relational database written in Java that can run embedded inside a JVM application or as a standalone server, with tables stored on disk or entirely in memory. It is accessed through JDBC, supports MVCC transactions, encryption and full-text search, and ships in a single small jar with a browser-based console. Compatibility modes that imitate other databases' SQL dialects make it a common choice for unit and integration tests in Java projects.

Written from scratch by Thomas Mueller, the original author of Hypersonic SQL, with development starting in May 2004 and the first public release on 2005-12-14; it shares no code with HSQLDB and is maintained by volunteer committers under the h2database GitHub organization, with no company or foundation behind it.

Embedded SQL DatabasesIn-Memory Relational

Last verified:

Key facts

LicenseMPL-2.0 OR EPL-1.0
License notesDual-licensed: users may choose the Mozilla Public License 2.0 or the Eclipse Public License 1.0.
Open source (OSI)Yes
First release2005
Latest stable version2.5.252 (Sep 23, 2026)
Deploymentembedded, self-hosted
Wire compatibilitypostgres
Query languagesSQL
Written inJava
Also known asH2, H2 Database, H2DB
Websiteh2database.com
Documentationh2database.com
Source codegithub.com/h2database/h2database

Radar

trial Ready for real projects where the fit is clear; less track record or a narrower sweet spot than adopt.

A convenient embedded or in-memory SQL engine for JVM tests and small tools, but its dialect emulation is partial, so production-like testing against the real target database is still advisable.

Ring reviewed Dec 3, 2026.

Alternatives

All H2 Database Engine alternatives

Featured in guides

Sources

Last verified:

  1. h2database.com/html/main.html h2database.com
  2. h2database.com/html/license.html h2database.com
  3. h2database.com/html/history.html h2database.com
  4. h2database.com/html/features.html h2database.com
  5. github.com/h2database/h2database/releases github.com
  6. github.com/h2database/h2database github.com

Found an error? See how to report a correction.