Download the MongoDb JDBC driver, copy the JDBC URL into DbSchema, and start designing schemas with ER diagrams — free Community Edition.
A JDBC driver is a Java .jar library that lets applications connect to MongoDb.
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.
Host, port, database name, and SSL options are passed in a URL starting with jdbc:.
Each MongoDb driver uses its own syntax — see the connection details below.
MongoDB is the most popular document-oriented database, storing data as flexible JSON-like BSON documents instead of rows in tables. It is widely used for content management, real-time analytics, IoT, and applications that need schema flexibility.
We open source our JDBC driver for MongoDb. DbSchema features for MongoDb are described here. The driver source code is accessible on GitHub.
The driver binaries can be downloaded as zip file, which you should uncompress.Download the zip, unpack and include the jar files in your classpath. The driver is compatible with Java 11.
For accessing the driver source code please visit the GitHub repository:
The driver is written on top of the native MongoDb Java driver.
The driver URL is the same as in the MongoDb documentation.
Example:
mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]
The URL allows connecting to multiple databases. In DbSchema you can set this by choosing 'Custom URL' in the connection editor and entering the URL as string. For URL details check the MongoDb documentation.
A default installation is deliberately unreachable from anywhere but its own machine, so two things have to change before DbSchema connects.
mongod binds localhost out of the box, which refuses every remote
client. In mongod.conf set net.bindIp to the private address clients
use — MongoDB recommends naming that interface rather than opening all of them. Where all
addresses really are needed, net.bindIpAll or
net.bindIp: 0.0.0.0 does it. Restart mongod afterwards.
admin rather than the one you want to browse. That is what
?authSource= in the URL is for, and a mismatch produces an authentication failure
that looks like a wrong password.
Bind narrowly and firewall the port. An exposed MongoDB without authentication is found by scanners within hours.
Atlas is managed, so there is no mongod.conf. Access is governed by an allowlist and the
host is an SRV record rather than a machine name.
mongodb+srv:// and an
On-Premise variant using mongodb://. An Atlas cluster needs a Cloud entry: the SRV
form is what resolves the cluster's members for you.
The same connection page in Atlas has a link for resetting the database user's password, which is separate from your Atlas account password.
Where the cluster sits in a peered VPC with no public route, use Setup SSH Tunnel... through a host inside that network instead; DbSchema ships presets for tunnelled connections in both the Cloud and On-Premise families.
DbSchema displays MongoDB collections and their inferred schemas as interactive diagrams, even without a fixed schema. Use the Relational Data Explorer to browse documents and navigate embedded sub-documents, and the Query Builder to compose MongoDB-compatible SELECT queries via the JDBC interface.
Connect MongoDb, build your first ER diagram in minutes. No account required.
Get the MongoDb driver zip below and install DbSchema for Windows, macOS, or Linux.
In DbSchema, open Driver Manager, add the extracted JAR, and paste your JDBC URL.
Reverse engineer MongoDb, edit the model visually, and publish schema documentation.
After the JDBC driver connects, you get ER diagrams, SQL editor, schema sync, and HTML documentation in one desktop app. Compare DbSchema editions.
Reverse engineer MongoDb into an interactive diagram and edit structures visually.
Run SQL with autocomplete or compose queries without writing every join by hand.
Export HTML docs your team can browse without installing DbSchema.
Connection tips, ports, SSL, and schema design workflows on the database landing page.
Other drivers teams often configure alongside MongoDb.
Teams working with MongoDb often use these engines too. Explore dedicated guides and JDBC setup for each.