Skip to main content

Arpe SQL Visualizer: See the Joins of a T-SQL Query

Romain Ferraton
Romain Ferraton, ARPE.IO CEO
2026-12-04 · 8 min · Tools · SQL Server
TL;DR

Arpe SQL Visualizer turns a T-SQL SELECT into a graph of its tables and joins, rebuilt 250 ms after you stop typing. Click a table and its code lights up; click the code and the table lights up in the graph. It flags nested joins, RIGHT JOINs, WHERE filters that turn a LEFT JOIN into an INNER JOIN, and Cartesian products. It is one HTML file that runs in your browser and sends nothing. T-SQL is read today; PostgreSQL, Oracle, MySQL and eight more dialects are planned.

A 40-table query generated by a reporting tool, or a view that ten people edited over ten years, is hard to read from the text alone. Which table drives the result? Which joins can return NULL? Is that LEFT JOIN still a left join after the WHERE clause?

Arpe SQL Visualizer answers by drawing the query. You paste it on the right and the join graph appears on the left. The tool runs in the page below.

Try it​

Arpe - SQL VisualizerOpen in a new tab
Full screen

The two panes need room. Use Full screen above the tool, or Open in a new tab. Your queries are kept in your browser's local storage, so you find them again on your next visit.

The tool opens on three sample queries, each in its own tab: CTE, DSS and INDUS, the last one with a layout arranged by hand. The Samples menu opens them again in new tabs.

CTE: 7 tables

Three chained CTEs, with a CROSS JOIN to a grand total.

DSS: 22 tables

A data-warehouse report: a fact table, its dimensions and a GROUP BY, as a BI tool generates it.

INDUS: 41 tables

A manufacturing query with a nested join whose ON clause comes after the block, two RIGHT JOINs, and 14 key/value properties folded into one branch.

What the graph shows​

Each join type has its own line, and each table is colored by what can happen to its rows.

Joins
  • INNER solid line
  • LEFT dashed, with a circle on the side that can be NULL
  • RIGHT / FULL dashed, orange
  • CROSS / APPLY red
  • Subquery dotted: IN, EXISTS, ANY, scalar
Tables
  • Preserved every row is kept
  • Optional its columns can come back NULL
  • Subquery only read to filter
  • CTE / derived built inside the query

There are two views. Condensed runs the main join chain down the page, puts side tables to the right and folds three or more identical branches into one box. Extended draws a layered graph with the join type on each edge. Its flow runs left to right when you first open the tool, and the ← → ↓ ↑ buttons turn it. Each CTE, subquery or derived table stays in its own frame, and edges are routed between the tables rather than through them.

Graph and code, linked both ways​

Click a table and the editor highlights where it is declared, its ON clause and the columns the query selects from it. A strip next to the scrollbar shows where those lines are, and ↑ / ↓ jump between them. Click anywhere in the code and the graph selects the matching table or join.

The graph is rebuilt as you type. While the query can't be parsed, for example halfway through a word, the last good graph stays on screen and the error is underlined in the code.

What it points out​

The Details panel under the graph lists what is worth a second look:

Can change the result
  • WHERE on an optional table turns the outer join into an inner join
  • Cartesian product a table with no join condition
  • Duplicate risk a table joined only to filter
  • Unknown alias a column that points nowhere
Hard to read
  • Nested joins an ON clause written after the whole block
  • RIGHT JOIN usually clearer as a LEFT JOIN
  • Repeated key/value joins a candidate for PIVOT

Format re-indents the query, nested joins included. It only changes whitespace and never touches a token, so the formatted query runs exactly like the original.

Nothing leaves your browser​

The page is a single HTML file with no library, no web font and no network request. The parser is written in JavaScript and embedded in the page. Paste a production query with real table names: it stays in your browser.

Tabs let you keep several queries side by side, each with its own undo history. Save… writes them to a .json file with the folded branches and the tables you moved by hand. Open… reads it back, or opens a .sql file as a new tab.

The T-SQL it reads​

SQL ServerT-SQL: SQL Server, Azure SQL, Microsoft Fabric, Synapse
  • INNER / LEFT / RIGHT / FULL JOIN
  • LOOP / HASH / MERGE / REMOTE hints
  • Nested joins with deferred ON
  • CROSS JOIN
  • CROSS / OUTER APPLY
  • Comma joins linked in WHERE
  • IN / EXISTS / ANY / ALL / scalar subqueries
  • Derived tables and VALUES
  • CTEs
  • UNION / EXCEPT / INTERSECT
  • WITH (NOLOCK) and table hints
  • TABLESAMPLE
  • FOR SYSTEM_TIME
  • PIVOT / UNPIVOT
  • TOP
  • [bracketed] and "quoted" names

Only the first SELECT of the text is drawn. Anything before it, such as CREATE VIEW … AS, is skipped, so you can paste a whole view definition.

Next: other SQL dialects​

The Dialect button in the tool's header opens a panel with one card per dialect, and the panel can be hidden again. T-SQL is the default and, for now, the only dialect it reads. The others are listed as planned, in this order:

First
  • PostgreSQL also Redshift and Greenplum
  • Oracle including (+) outer joins
  • MySQL / MariaDB
Then
  • DuckDB
  • Snowflake
  • Databricks SQL
  • BigQuery
  • IBM Db2
  • SAP HANA
  • Teradata
  • ClickHouse

Each dialect brings its own join syntax to draw: USING and NATURAL JOIN, LATERAL, semi and anti joins, ASOF joins, Oracle's (+), and array expansion with UNNEST, FLATTEN or ARRAY JOIN. A dialect becomes selectable once its parser rules and its tests are done.