Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.
Latest commit message
Commit time
August 11, 2023 20:44
April 29, 2022 19:42
September 27, 2023 19:42
October 19, 2019 22:00
June 7, 2022 17:44
November 29, 2017 19:25


Maven Central Docker Pulls Development Documentation Status Quality Gate Coverage Gitter

SchemaSpy is a database metadata analyzer. It helps your database administors and developers visualize, navigate and understand your data model. With an easy-to-use HTML-based report, traversing the entity-relationship diagram has never been simpler. Our product showcase is available at

SchemaSpy sample


SchemaSpy is a stand alone tool. Just download the lastest JAR file or Docker image and you're ready to go!

curl -L \
    --output ~/Downloads/schemaspy.jar

For unreleased bug fixes and features-in-progress, download our snapshot JAR or use Docker tag snapshot

Quick start

Let's assume you're using PostgreSQL (11 or later). First, download their JDBC driver.

curl -L \
    --output ~/Downloads/jdbc-driver.jar

Then run SchemaSpy against your database and you're ready to browse it in DIRECTORY/index.html.

java -jar ~/Downloads/schemaspy.jar \
    -t pgsql11 \
    -dp ~/Downloads/jdbc-driver.jar \
    -db DATABASE \
    -host SERVER \
    -port 5432 \
    -u USER \
    -p PASSWORD \

If you aren't using PostgreSQL, don't panic! Out of the box, SchemaSpy supports over a dozen different databases. List them by using -dbhelp. Still not enough? As long as your database has a JDBC driver you can plug it in to SchemaSpy.

Documentation and FAQs

We host our documentation on Read the Docs. Be sure to check out the section on troubleshooting common problems.

Main use cases

SchemaSpy covers a lot of use cases for database analysis and documentation. Be sure to check out the guides provided by the community later in this README.

On-demand database documentation

The prefered way to document databases is through entity-relationship (ER) diagrams. However, drawing these diagrams manually is such a time-consuming and error-prone process that we hardly ever draw them in practice. When the diagrams are drawn, they rarely stay up-to-date. With SchemaSpy, this is no longer a problem. The diagrams can be generated quickly and even as a part of your CI/CD workflow to ensure it's always up to date.

Your database in numbers

SchemaSpy can collect various kinds of interesting statistics to describe the shape and form of your database's structure. Drill down deeper into these statistics directly in the report or export them to excel or CSV for further QA analysis.

Keep the data confidential

Nowadays, a company's data can be their most valuable asset. Since SchemaSpy only reads structural information, it works just as well on an empty database replica. This means that the report can be shared for third party analysis without fear.

Detect sub-optimal constructs

SchemaSpy incorporates knowledge about best practices in database design. It can locate and report anomalies such as missing indexes, implied relationships, and orphan tables.


Welcome to the SchemaSpy community! Just reading this file or using the tool means that you're a part of our community and contributing to the future of the project. We're grateful to have you with us!

Some of our community members have put extra effort into sharing SchemaSpy with more people, asked their companies to provide financial aid, or decided to improve the software. We wish we had the space to thank each of you individually because every Github star, tweet or other activity reminds us that our work is appreciated.

Special thanks

For creating the first five versions of SchemaSpy:

For perpetuating SchemaSpy ever since:

For creating tutorials and guides for the community:

Scientific usage

We are proud to note that SchemaSpy assists researchers in their work.

To cite SchemaSpy, please use:

SchemaSpy Team (2023) SchemaSpy: Database documentation built easy. SchemaSpy. URL

The BibTeX entry for LaTeX users is:

  title = {SchemaSpy: Database documentation built easy},
  author = {{SchemaSpy Team}},
  organization = {SchemaSpy},
  year = {2023},
  url = {}

Build Instructions


SchemaSpy is built using maven and we utilize the maven wrapper.
Windows mvnw.cmd package
Linux ./mvnw package
The resulting application can be found in target


You need your own SonarQube:
Windows mvnw.cmd -P sonar clean verify$(boot2docker ip):9000 -Dsonar.jdbc.url="jdbc:h2:tcp://$(boot2docker ip)/sonar"
Linux ./mvnw -P sonar clean verify

Watch results at:
Linux http://localhost:9000
Windows http://$(boot2docker ip):9000


Built using Python
Create venv
Install dependencies pip install -r docs/requirements.txt
Navigate into docs
Windows make.bat clean && make.bat html
Linux make clean html
The resulting documentation can be found in docs/build/html