whatisgithub

What is sqltoerdiagram?

royalbhati/sqltoerdiagram — explained in plain English

Analysis updated 2026-05-18

45JavaScriptAudience · developerComplexity · 2/5Setup · easy

In one sentence

A browser-only tool that converts pasted SQL CREATE TABLE statements into an interactive, editable diagram of table relationships.

Mindmap

mindmap
  root((repo))
    What it does
      SQL to ER diagram
      Runs entirely in browser
      No server involved
    Interaction
      Drag and zoom
      Edit columns inline
      Highlight relationships
    Sharing
      Save as JSON project
      Shareable compressed URL
    Supported dialects
      MySQL
      PostgreSQL
      SQLite
      SQL Server

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Paste your CREATE TABLE statements to instantly visualize how your database tables relate.

USE CASE 2

Edit table and column names directly on the diagram and see the SQL update automatically.

USE CASE 3

Generate a share link that encodes your entire schema project without touching a server.

USE CASE 4

Export the diagram as a PNG or SVG for documentation.

What is it built with?

JavaScript

How does it compare?

royalbhati/sqltoerdiagramduhubz/rosetta-magazine-researchereugeny/instacode
Stars454545
LanguageJavaScriptJavaScriptJavaScript
Last pushed2023-05-23
MaintenanceDormant
Setup difficultyeasyeasyeasy
Complexity2/51/51/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min
Described as open source, but the specific license is not stated.

So what is it?

SQL to ER Diagram is a browser-based tool that turns SQL schema code into a visual diagram showing how database tables relate to each other. You paste in CREATE TABLE statements, and the page draws an interactive chart with boxes for each table and lines connecting tables that reference each other through foreign keys. Nothing is sent to a server: the entire tool runs in your browser, so your database schema stays on your machine. The diagram is interactive in several ways. You can drag tables to arrange them, zoom in and out, and click a table to highlight only its relationships while fading out everything else. You can also double-click table names, column names, or data types to edit them directly on the diagram, and the tool updates the SQL text in the editor to match. Renaming a table also updates every reference to that table elsewhere in the schema. A layout button auto-arranges tables to avoid overlaps, with options for horizontal or vertical direction and different spacing presets. You can save a project as a JSON file that stores your SQL, your table positions, the camera view, and which database dialect you are using. You can also generate a share link that encodes the entire project in the URL itself, compressed and stored in the link fragment so it never touches a server. The tool supports MySQL, PostgreSQL, SQLite, and SQL Server syntax for reading schemas and for suggesting column types when you add new columns. Additional features include sticky notes and group boxes you can add to annotate sections of the diagram, PNG and SVG export, light and dark themes, and a syntax-highlighted SQL editor. The tool is open source and available at sqltoerdiagram.com. To run it locally, you install dependencies with npm and start a development server.

Copy-paste prompts

Prompt 1
Convert this set of CREATE TABLE statements into a diagram using sqltoerdiagram.
Prompt 2
Help me rename a table in my schema and update every foreign key reference to match.
Prompt 3
Show me how to generate a shareable link for my database schema diagram.
Prompt 4
Which SQL dialects does this tool support for reading and suggesting column types?

Frequently asked questions

What is sqltoerdiagram?

A browser-only tool that converts pasted SQL CREATE TABLE statements into an interactive, editable diagram of table relationships.

What language is sqltoerdiagram written in?

Mainly JavaScript. The stack also includes JavaScript.

What license does sqltoerdiagram use?

Described as open source, but the specific license is not stated.

How hard is sqltoerdiagram to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is sqltoerdiagram for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.