Skip to content
Guide · HeidiSQL

HeidiSQL ER Diagram: Not Supported, and What to Use Instead

HeidiSQL does not have an ER diagram feature. Its feature list does not mention one, and the author closed the feature requests on GitHub, the latest as "not planned". This page explains what HeidiSQL offers instead for understanding relationships (the Foreign keys tab, reverse foreign keys and the database tree), and how to move your schema into a tool that draws entity relationship diagrams.

Steps and facts checked 8 October 2026 against the vendor's official documentation. Versions covered: HeidiSQL 12.21; MySQL 8.4 Reference Manual for the INFORMATION_SCHEMA query. Next review due April 2027. Menus, shortcuts and prices change between releases; check the vendor's documentation for your version.
Short answer
  • There is no HeidiSQL ER diagram designer or viewer in version 12.21, and none is planned.
  • GitHub issue #2117 (ERD editing and visualisation) is labelled wontfix and closed as not planned; the author said it is beyond what he could implement himself.
  • Inside HeidiSQL, use the table editor's Foreign keys tab, which since 12.17 can also list reverse foreign keys (tables that reference this one).
  • To get a diagram, export the structure with Tools > Export database as SQL (Data: No data) and open it in a modelling tool, or connect that tool to the database directly.
How we know: Research-based: the absence of an ER diagram feature was checked against the heidisql.com feature list, HeidiSQL GitHub issues #2117 and #832 and the release notes; the workaround steps against the HeidiSQL help page, main window definition and the MySQL Reference Manual, on 8 October 2026. The plan for this page asked for a tutorial on a sample database; because the feature does not exist, there is nothing to demonstrate.

Does HeidiSQL have an ER diagram feature?

No. The HeidiSQL home page lists its features (multiple connections, SSH and SSL, table and routine editors, SQL export, server to server export, text file import, grid exports, user management and more), and an ER diagram is not among them. On GitHub, two feature requests for one were closed:

  • Issue #832, "Generating ER diagram of database structure". The author asked for more detail, closed it, and later wrote that he did not think "such a graphical mega feature" would get done by him, floating the idea of passing the structure to an online diagram tool.
  • Issue #2117, ERD editing and visualisation. The author replied that this is beyond what he could implement himself and would need an easily adoptable Delphi component; it is labelled wontfix ("Nothing planned") and closed as not planned.

The project's contribution rules also say pull requests are accepted only for bug fixes, not new features, so an outside contributor cannot simply add one. If you came here for a HeidiSQL ER diagram tutorial, the honest answer is to use HeidiSQL for data and structure work and another tool for the diagram.

Seeing relationships inside HeidiSQL

  • Foreign keys tab. Open a table in the table editor and switch to Foreign keys to see its outgoing keys. Release 12.17 added reverse foreign keys on this tab, so you also see which tables point to the current one, with a toolbar button to switch the listing off because the lookup can be slow.
  • Columns in the tree. Release 12.21 can show table columns as child nodes in the database tree, with index icons, as an opt-in display option.
  • Grid lookups. When you edit a foreign key column in the data grid, HeidiSQL can offer a drop-down of values from the referenced table (12.21 enabled this in SQL Server mode too).
  • A query. On MySQL and MariaDB, INFORMATION_SCHEMA.KEY_COLUMN_USAGE lists every foreign key column and the table and column it references, which is the raw material of a diagram.
MySQL: list foreign keys in one database (run in a HeidiSQL query tab)
-- MySQL / MariaDB
SELECT TABLE_NAME, COLUMN_NAME, CONSTRAINT_NAME,
       REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME
FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE
WHERE TABLE_SCHEMA = 'mydb'
  AND REFERENCED_TABLE_NAME IS NOT NULL
ORDER BY TABLE_NAME, CONSTRAINT_NAME, ORDINAL_POSITION;

Export the schema for a diagram tool

HeidiSQL's SQL export, documented on the help page, can write a structure-only script that diagram tools can read:

  1. Select the database in the tree and choose Tools > Export database as SQL.
  2. Tick the tables to include and set table creation options (create, and optionally drop first).
  3. Set Data to No data for a structure-only export.
  4. Under Output, pick a single .sql file (or clipboard).
  5. Run the export, then import or reverse engineer that script in your modelling tool.

Many diagram tools can instead connect to the database and read foreign keys directly, which keeps the diagram in step with the live schema. Either way, foreign keys must exist in the database; tables linked only by naming convention will appear unconnected.

Tools that draw ER diagrams

If diagrams are a regular need, a client that includes them may suit you better than HeidiSQL plus a second tool. Our guides cover the options: best ER diagram tools, the MySQL Workbench review for MySQL-only modelling, and the DBeaver review for a free cross-database client. For a direct comparison see DBeaver vs HeidiSQL and HeidiSQL vs MySQL Workbench.

Frequently asked questions

Can HeidiSQL generate an ER diagram?

No. HeidiSQL 12.21 has no ER diagram feature, and the related GitHub requests were closed by the author, the latest as not planned.

Will HeidiSQL add ER diagrams in version 13?

Nothing published says so. Version 13 is a new code base shared with the Linux and macOS builds, and the ERD request remains labelled wontfix.

How can I see foreign keys in HeidiSQL?

Open the table and use the Foreign keys tab in the table editor. Since 12.17 it can also show reverse foreign keys, the tables that reference the current one.

What free tool can draw a diagram of a MySQL database?

See our ER diagram tools guide; MySQL Workbench and DBeaver are covered in their reviews.

Sources

Checked 8 October 2026.

How we research tool guides: our editorial method. CodeWithSQL earns nothing from the vendors mentioned.

Still choosing a SQL client?

Read the full reviews, or compare tools side by side.