VS Code Extensions
sql2json

sql2json

by Yusuf-Patel

Convert SQL query results into clean JSON arrays directly in VS Code with automatic parsing and type inference.

Downloads

103

Rating

— (0)

Version

1.0.0

Last updated

Apr 05, 2026

sql2json

-The way to convert SQL query results into clean JSON arrays directly inside Visual Studio Code.

-Stop manually formatting JSON. sql2json reads tabular data directly from your editor and outputs perfect JSON.

*How It Works:

1.Run a query in your SQL tool (DBeaver, SSMS, pgAdmin, MySQL Workbench, etc.). 2.Copy the results grid. 3.Paste it into a VS Code file. 4.Highlight the pasted data, Right-Click, and select "sql2json: Convert to JSON". 5.A new file opens instantly with your JSON array.

*Features:

.Smart Parsing: Automatically detects if your columns are separated by Tabs, Pipes (|), or Commas. .Type Inference: Automatically converts numeric strings into actual JSON Numbers, and SQL NULLs into JSON null. .Clean Output: Strips annoying trailing quotes from headers and data cells. .Zero Setup: No servers, no connections, no configuration required. Just highlight and click.

*Command: sql2json: Convert to JSON (Available in Right-Click Menu and Command Palette)

*Example: Input (Copied from SQL Manager):

id name age city1 John 25 New York2 Jane NULL London3 Mike 30 "Chicago"

*Output (Instant JSON): [ { "id": 1, "name": "John", "age": 25, "city": "New York" }, { "id": 2, "name": "Jane", "age": null, "city": "London" }, { "id": 3, "name": "Mike", "age": 30, "city": "Chicago" } ]