Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>sql2jsonNew to Visual Studio Code? Get it now.
sql2json

sql2json

Yusuf-Patel

|
2 installs
| (0) | Free
Instantly convert SQL query results (tabular data) to clean JSON arrays. Select your data, right-click, and convert.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

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" } ]

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft