Developer Studio

SQL Lens

Turn a SQL script into an interactive map. Paste code or drop a .sql file to see tables, keys, dependencies, and query flow. Each insight links back to its source. Analysis runs in your browser.

100% Local In-Browser Processing

Zero uploads to external servers. This tool retains a temporary draft in this device's local storage (localStorage) for convenience and continuity. You can delete saved data via the button on the right.

v2.2.0
Size: 0 B
Keys: 0
Depth: 0
Input JSON
Formatted JSON or TypeScript

100% Local In-Browser Processing

Zero uploads to external servers. This tool retains a temporary draft in this device's local storage (localStorage) for convenience and continuity. You can delete saved data via the button on the right.

v2.2.0

Reading the results

Schema, samples, and plans in context

The diagram shows foreign keys declared in CREATE TABLE or ALTER TABLE. The Data view summarizes literal INSERT values only, up to 500 rows per statement. To inspect costs or runtime, paste a database generated EXPLAIN JSON plan; SQL text alone cannot reveal actual performance.

SQL Lens FAQ

Is my SQL uploaded?

No. Files, scripts, and plans are read and analyzed by JavaScript in your browser. A report is saved to your computer only when you choose Export report.

Does the tool run queries against my database?

No. It performs static text analysis without connecting to a database. To view a plan, paste JSON from an EXPLAIN command run separately.

Does the diagram find every relationship?

The diagram shows foreign keys declared in CREATE TABLE or ALTER TABLE statements in the file. Implicit relationships, dynamic SQL, and definitions in other files may be absent.