H2 JDBC Driver Download

Download the H2 JDBC driver, copy the JDBC URL into DbSchema, and start designing schemas with ER diagrams — free Community Edition.

Connect H2 in DbSchema Install the driver, open a connection, reverse engineer your schema, and sync changes visually.

About the H2 JDBC driver

A JDBC driver is a Java .jar library that lets applications connect to H2. DbSchema uses JDBC to reverse engineer schemas, run SQL, and generate documentation. Driver files are usually published by the database vendor or an open-source project.

JDBC URL format

Host, port, database name, and SSL options are passed in a URL starting with jdbc:. Each H2 driver uses its own syntax — see the connection details below.

The H2 JDBC driver

H2 is a fast, embedded Java SQL database engine, widely used for unit testing, Spring Boot applications, and lightweight embedded use cases. It supports in-memory mode for tests that need a clean database on every run and file-based mode for persistence.

The H2 JDBC URL

  • Required File(s): h2-1.1.108.jar
  • Java Driver Class: org.h2.Driver
  • JDBC URL: jdbc:h2:file:FILE or jdbc:h2:tcp://HOST/~/DB
  • Website: H2

Download H2 JDBC Driver

The driver archive is a zip file. Extract it and load the .jar files using DbSchema's Driver Manager.

File Mode or Server Mode

H2 runs either as a file opened directly by one process, or as a server other machines connect to. The Connection Mode combo has entries for both, and they behave very differently.

File mode

jdbc:h2:file:/path/to/mydb opens the database inside DbSchema. There is no port and no firewall — but H2 locks the file so that only one process has it open at a time. An application still running with that database open will keep DbSchema out, and the error names the file rather than explaining the cause. Stop the application first.

The path has no .mv.db suffix: H2 appends it. Pointing the URL at mydb.mv.db makes H2 look for mydb.mv.db.mv.db and quietly create an empty database instead.

Server mode

A database several people share needs H2 started as a server, and by default that server refuses remote clients.

  1. Start the server with remote access allowed. java -cp h2.jar org.h2.tools.Server -tcp -tcpAllowOthers. Without -tcpAllowOthers it accepts connections from its own machine only.
  2. Connect with a tcp URL. jdbc:h2:tcp://host/~/mydb, which is the Remote Server entry in the combo. The path is resolved on the server, not on your machine.
  3. Open port 9092 in the server's firewall. The database listens on port 9092 unless it was installed with a different one. A host firewall on the server blocks incoming connections on that port until a rule allows them. The firewall guide has the commands for Windows, ufw, firewalld and iptables.
  4. Connect from DbSchema. In the Connection Dialog choose Remote computer or custom port, fill in the server host and the port, then press Test Connection to check that the server answers before you connect.

Databases created by H2 1.4

H2 2.x cannot open a file made by 1.4.x — the storage format changed too much for an in-place upgrade. The supported route is to export with SCRIPT using the old version, then create the database with the new version and load it with RUNSCRIPT. If DbSchema reports a file it cannot read, check which H2 version wrote it before assuming the file is corrupt.

DbSchema and H2

DbSchema connects to H2 in both in-memory and persistent modes. Use DbSchema's Query Builder to explore H2 schemas during development, and the Schema Synchronization feature to compare H2 test schemas against production database schemas.

Test the driver with DbSchema

Connect H2, build your first ER diagram in minutes. No account required.

1
Download driver & DbSchema

Get the H2 driver zip below and install DbSchema for Windows, macOS, or Linux.

2
Register the .jar

In DbSchema, open Driver Manager, add the extracted JAR, and paste your JDBC URL.

3
Design & document

Reverse engineer H2, edit the model visually, and publish schema documentation.

Use H2 visually in DbSchema

After the JDBC driver connects, you get ER diagrams, SQL editor, schema sync, and HTML documentation in one desktop app. Compare DbSchema editions.

ER diagrams

Reverse engineer H2 into an interactive diagram and edit structures visually.

SQL & query builder

Run SQL with autocomplete or compose queries without writing every join by hand.

Schema documentation

Export HTML docs your team can browse without installing DbSchema.

Full H2 guide

Connection tips, ports, SSL, and schema design workflows on the database landing page.

Setup guides

JDBC driver FAQ

jdbc:h2:file:/path/to/db for file databases, jdbc:h2:mem:name for in-memory, and jdbc:h2:tcp://host/~/db for the H2 server mode.

No. DbSchema bundles the H2 JDBC driver (org.h2.Driver), and a driver zip is also available on this page.

Yes. DbSchema can open a file-based H2 database directly between application runs, letting you inspect or modify the schema without starting the app.

Other drivers teams often configure alongside H2.

Browse all JDBC driver downloads

Teams working with H2 often use these engines too. Explore dedicated guides and JDBC setup for each.

Browse all 100+ supported databases