SQL Query Formatter is a desktop SQL tokenizer, pretty-printer, DDL Entity-Relationship
diagram studio, and vector/document exporter for Linux developers and database engineers.
Format complex multi-CTE SELECT queries, joins, CASE expressions, DML statements, and
CREATE TABLE DDL locally on your desktop without uploading schemas to external services.
Key Features:
- SQL Tokenizer & Pretty-Printer: Pure-Python SQL lexer and formatter supporting
SELECT, WITH CTEs, JOINs, CASE expressions, INSERT, UPDATE, and CREATE TABLE
with UPPER/lower/Title keyword casing, configurable indent width, trailing or
comma-first style, dialect awareness, syntax highlighting, and compact Minifier.
- Visual ER Diagram Studio: Parses CREATE TABLE DDL (PRIMARY KEY, FOREIGN KEY
REFERENCES) into an interactive, draggable, auto-laid-out Entity-Relationship
diagram rendered with QPainter featuring table cards, PK/FK badges, and crow's-foot
relationship connectors.
- Schema & Diagram Exporter: Exports formatted .sql scripts, standalone vector SVG
diagrams, high-DPI PNG renders, and print-ready vector PDF documents via QPdfWriter.
Disclaimer: SQL Query Formatter is an independent open-source project by TC Studio and is not affiliated with, endorsed by, or sponsored by any third-party database formatting vendor.