Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>CSV to JSON PreviewNew to Visual Studio Code? Get it now.
CSV to JSON Preview

CSV to JSON Preview

Surendhar N D

|
2 installs
| (0) | Free
Turn CSV files into clear, formatted JSON previews. Preserve your data, include unsaved edits, and keep the original file intact.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CSV to JSON Preview

From spreadsheet rows to readable JSON, in one command.

Inspect CSV data as a neatly formatted JSON array inside VS Code. Each row becomes an object, with column headers as property names. A new read-only tab lets you review the result while your CSV stays intact.

What you get

  • Instant access: run Preview CSV as JSON from the Command Palette.
  • Readable results: indented JSON with syntax highlighting in a dedicated editor tab.
  • Data preserved: values stay as strings, including leading zeros and large numbers.
  • Your latest edits: previews include changes you have not saved yet.
  • CSV support: quoted commas, escaped quotes, multiline values, and common line endings.
  • Private processing: conversion runs in the VS Code extension host, with no uploads or telemetry.

Get started

  1. Install CSV to JSON Preview by SurendharND, or install the supplied VSIX using Extensions: Install from VSIX....
  2. Open a file with a .csv extension and select its editor tab.
  3. Press Cmd+Shift+P on macOS or Ctrl+Shift+P on Windows/Linux.
  4. Choose Preview CSV as JSON.

The JSON opens in a new read-only tab. To save or edit it, copy the contents into a new file and save it with a .json extension.

Requires VS Code 1.85 or later. Works in desktop VS Code and remote extension hosts. A browser-only extension host is not supported.

Example

Given this CSV:

name,employee_id,city
Ada,00123,London
Grace,00456,"New York"

The preview shows:

[
  {
    "name": "Ada",
    "employee_id": "00123",
    "city": "London"
  },
  {
    "name": "Grace",
    "employee_id": "00456",
    "city": "New York"
  }
]

How your data is handled

The first nonblank row supplies the property names. Surrounding whitespace is removed from headers, which must be nonempty and unique. Whitespace inside data values is preserved, and numbers, dates, booleans, and empty fields remain strings.

Blank lines are skipped. Empty files and files containing only headers produce []. Quoted commas and line breaks are supported; write a quote inside a quoted field as two double quotes (""). UTF-8 byte-order marks and LF, CRLF, and CR line endings are supported.

Each preview is a snapshot. After changing the CSV, select the CSV tab and run the command again to create a fresh preview. Conversion never writes to the source file.

Settings and limits

Open Settings and search for CSV to JSON Preview.

Setting Default Allowed range
csvToJson.maxFileSizeMB 5 MiB 1–50 MiB

Input size is measured as UTF-8 bytes. Formatted JSON has a fixed limit of 20,971,520 characters. These limits help keep previews manageable; split larger files before converting them.

Use Cancel in the conversion notification to stop a conversion. Run another conversion after the current one completes or is cancelled.

Troubleshooting

Message or issue What to check
Open a .csv file Select the CSV editor before running the command.
Empty or duplicate header Give every column a unique, nonempty name.
Unexpected or unterminated quote Wrap the whole field in quotes and escape internal quotes as "".
Wrong number of fields Each row must match the header's column count. Quote values containing commas.
Preview size limit Adjust the input limit in Settings or split the CSV into smaller files.
Semicolon- or tab-delimited data Export as comma-delimited CSV; other delimiters are not supported.

Privacy

No accounts, API keys, external services, or network requests are needed for conversion. The extension does not collect telemetry or upload your CSV data. In a remote workspace, processing takes place in that workspace's extension host. Untrusted and virtual workspaces are supported.

Support

Maintained by Surendhar N D · Publisher SurendharND.

For Marketplace installations, use the Q & A section on the extension listing. For a VSIX supplied directly, contact the person or team that provided it. Include your extension version, VS Code version, exact error, and a small sample with confidential information removed.

License

Proprietary software. Copyright © 2026 Surendhar N D. See the bundled LICENSE for terms.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft