Introduction
ChartDB is a browser-based database diagram editor that imports your existing schema with a single query. It supports MySQL, PostgreSQL, SQL Server, MariaDB, and SQLite, and produces clean visual ER diagrams you can export or share.
What ChartDB Does
- Imports database schemas from a single metadata query (no direct DB connection required)
- Renders interactive entity-relationship diagrams in the browser
- Supports drag-and-drop table layout with auto-arrangement options
- Exports diagrams as PNG, SVG, or SQL migration scripts
- Provides AI-assisted schema suggestions and optimization hints
Architecture Overview
ChartDB is a client-side React and TypeScript application that runs entirely in the browser. Schema data is parsed from pasted SQL query output, so no direct database connection is needed. The diagram rendering uses a custom canvas engine built on React Flow. All data stays in the browser unless you explicitly export it.
Self-Hosting & Configuration
- Deploy with Docker using the official image in one command
- Serve as a static site behind any web server (Nginx, Caddy, etc.)
- No backend or database required since all processing happens client-side
- Customize branding and default settings via environment variables
- Works offline once loaded since there are no server-side dependencies
Key Features
- Zero-connection import via a copy-paste SQL query approach
- Privacy-first design with all data processed in the browser
- Multi-database support including MySQL, PostgreSQL, SQLite, MariaDB, and SQL Server
- AI-powered schema analysis for identifying design improvements
- Clean, modern UI with dark mode and customizable themes
Comparison with Similar Tools
- dbdiagram.io — Popular SaaS diagramming tool with DSL input, but proprietary and limited free tier
- DBeaver — Full database client with ER diagrams, but heavier and requires DB connection
- pgAdmin — PostgreSQL-specific admin with basic ER views, limited to one database type
- Lucidchart — General-purpose diagramming SaaS, not specialized for database schemas
- DrawSQL — Visual database design tool with collaboration features, but proprietary
FAQ
Q: Does ChartDB connect directly to my database? A: No. ChartDB imports schemas from a SQL query result that you paste into the editor. This means no credentials are shared with the tool.
Q: Can I use ChartDB for designing new schemas from scratch? A: Yes. You can create tables, define columns, and set relationships directly in the visual editor without importing an existing schema.
Q: What export formats are available? A: ChartDB exports diagrams as PNG and SVG images, and can generate SQL DDL scripts for supported databases.
Q: Is ChartDB free? A: Yes, ChartDB is fully open source under the AGPL-3.0 license.