IT
OmnvertImage • Document • Network

CSV ↔ JSON Converter

Convert CSV to JSON and JSON to CSV — instant, private, browser-only. No upload, no signup.
Developer Tools →
Delimiter
Output style
Input
Lines: 0 · Chars: 0
Output
Lines: 0 · Chars: 0
100% client-side — your data never leaves your browser. Use Ctrl/Cmd+Enter to re-run manually.
About this tool

CSV and JSON are the two most common data interchange formats on the web. CSV is the universal language of spreadsheets — every database admin panel, analytics dashboard, marketing platform and SaaS tool exports CSV, because spreadsheets have been the lingua franca of business data since VisiCalc shipped in 1979. JSON is the universal language of APIs, JavaScript applications, configuration files, and modern data pipelines; since it became an IETF standard in 2013 it has eaten almost every other lightweight interchange format on the open web. Between the two sits a constant, daily need: move rows from a sheet into a JavaScript app, or move an API response into a sheet so a non-engineer can filter it.

This converter handles that round trip correctly, quickly, and privately. Paste CSV into the left panel and the right panel fills with a clean JSON array in milliseconds. Paste a JSON array and the right panel fills with a properly-quoted CSV ready to open in Excel, Numbers, LibreOffice Calc, or Google Sheets. The underlying parser is PapaParse, the same library that powers most CSV import features in the JavaScript ecosystem, so you get the same edge-case handling as production data pipelines: correctly escaped quoted fields, newlines inside cells, UTF-8 with or without a BOM, and mixed line endings.

On the CSV-to-JSON side, there are four behaviors you can control. First, whether the first row is treated as headers: turning this on produces an array of objects with the header names as keys; turning it off produces an array of arrays where every row is just a list of values. Second, delimiter handling: auto-detection identifies commas, semicolons, and tabs automatically, which matters because European spreadsheets often use semicolons — Excel on a German or Turkish locale will default to that — while English locales and most APIs use commas. Third, the output shape: you can choose a standard array of objects, a compact array of arrays, or a keyed object where the first column becomes the top-level key, which is useful when you want quick O(1) lookups by ID. Fourth, type inference: with inference off, every value is a string, which is safe and loses no information; with inference on, numeric columns become real numbers, the strings true and false become booleans, and empty cells plus the literal word null become JSON null. Type inference is optional on purpose — implicit conversions are a common source of bugs when a column of ZIP codes or phone numbers loses its leading zeros, so the default is off.

On the JSON-to-CSV side, the converter accepts either an array of objects or an array of arrays. With an array of objects, the object keys become column headers and the values become rows in those columns. Missing keys across objects are handled cleanly: the union of all keys forms the header row and missing cells are left empty. With an array of arrays, the first inner array is treated as the header row. Nested objects are a common source of pain in this direction, and PapaParse by default will stringify them as [object Object], which is almost never what you want. This tool flattens objects one level deep using dot notation: an address field like {"address": {"city": "NY", "zip": "10001"}} becomes two columns named address.city and address.zip. Deeper nesting is preserved as JSON strings in the cell; in practice one-level flattening covers the vast majority of real API responses.

The output delimiter is separately configurable. For spreadsheet use, match the delimiter your target application expects: comma is the default on English systems, semicolon on European systems, and tab is useful for pasting directly into text editors or for TSV-specific pipelines like Google's BigQuery bulk import. Header inclusion can be disabled when you want a headerless CSV — for example, when appending new rows to an existing sheet that already has headers.

Both conversions are live. As you type or paste, the output updates after a 300-millisecond debounce. For very large inputs — typically above two megabytes — a warning appears and you can rely on the manual trigger with Ctrl/Cmd+Enter to avoid re-running the parser on every keystroke. PapaParse itself is fast enough to handle tens of thousands of rows interactively, but the browser also has to render the result, so on low-end devices the explicit trigger becomes the better UX.

The copy and download buttons cover the two most common next steps. Copy places the output on your clipboard with a small confirmation checkmark; download creates a local file with the right extension (.json or .csv) and triggers a browser save dialog. The generated file names are deliberately generic (data.json, data.csv) so you can rename them when saving; there is no attempt to be clever about preserving an original filename because the input is often pasted text rather than a file. The clear button resets both panels and is always available if you want to start fresh.

Privacy is the reason to use this tool instead of a typical free online converter. Data that moves through CSV or JSON on a real workday is often sensitive: customer lists exported from a CRM, user analytics tables, internal pricing, product inventory, or audit logs. Uploading any of that to a third-party server exposes it to logging, caching, and employee access even when a privacy policy says otherwise. This converter runs entirely in your browser: the bytes you paste never leave the page. You can disconnect from the internet after the page loads and the tool will still work. You can run it inside a corporate VPN behind a proxy that blocks outbound uploads and it will still work. If you are handling anything under GDPR, HIPAA, SOX, or an NDA, a client-side converter is the only option that does not require a vendor-risk review.

A few subtle details are worth knowing. First, CSV's quoting rules are surprisingly tricky: a cell containing a comma, newline, or double-quote must be wrapped in double-quotes, and any internal double-quotes must be doubled. The converter handles this correctly in both directions, so round-tripping a CSV through JSON and back produces byte-identical output in most cases. Second, JSON does not have a canonical column ordering, so when converting JSON-to-CSV the column order follows the insertion order of keys in the first object, which in modern JavaScript engines is the order they appear in the source. If a later object has new keys, they are appended to the right of existing columns. Third, null versus empty string is a real distinction: in type-inference mode, an empty CSV cell becomes JSON null, while the literal string "" in JSON becomes an empty CSV cell. This matters for pipelines that distinguish missing data from empty data.

This tool pairs naturally with the other Omnvert developer utilities. The JSON Viewer is useful after a conversion for exploring the result tree, minifying, or sorting keys alphabetically. The Regex Tester helps when you need to clean a messy CSV before importing — things like normalizing phone numbers, stripping whitespace, or validating email columns. The Hash Generator is handy when you need stable IDs from a column for deduplication or cache keys. And the Base64 Converter covers the adjacent need of encoding binary data to put into a CSV or JSON field safely. All of these run in the browser with the same privacy guarantees, so an entire data-cleanup workflow can happen in a single tab without a single request to a conversion API.

Finally, a practical note on common data shapes. API responses often wrap their actual payload in an envelope like {"data": [...], "meta": {...}} — this converter expects the array itself as input, so you need to paste the inner data array, not the envelope. Spreadsheet exports sometimes include a UTF-8 BOM and sometimes include trailing empty rows from the export tool; both are handled transparently. Files with mixed delimiters (a comma in one row, a semicolon in another) are malformed and cannot be parsed unambiguously — if that happens, pick a manual delimiter that matches the majority of rows and fix the outliers by hand. These edge cases are rare but when they happen the error message at the top of the output panel will tell you exactly where things went wrong, including the line number.

It helps to know a little of the history to understand why CSV and JSON both need converters. CSV was never formally standardized until RFC 4180 in 2005, and even that document is a best-effort description of what was already widespread practice rather than a strict rule. As a result, CSV in the wild has genuine ambiguity: line endings can be CRLF, LF, or even CR; quoted fields may span multiple lines; encoding can be UTF-8, UTF-16, Windows-1252, or an older regional code page; and the delimiter is often semicolon in Europe because comma collides with the decimal separator. A robust converter has to handle all of these without complaining, and that is what PapaParse under the hood of this tool has been hardened to do over a decade of production use.

Use cases
  • Convert a CSV export from a database admin panel into JSON for a JavaScript app.
  • Convert a JSON API response into CSV so a non-engineer can open it in Excel or Google Sheets.
  • Flatten nested JSON records one level deep to produce a spreadsheet-friendly table.
  • Normalize European semicolon-delimited CSVs into comma-delimited CSVs or JSON.
  • Prepare seed data for tests and fixtures from a spreadsheet your product team maintains.
  • Quickly inspect a CSV by converting it to JSON and pasting into the JSON Viewer for tree navigation.
  • Build a CSV for bulk import into a SaaS tool (CRM, email platform, analytics) from a JSON export elsewhere.
  • Convert comma-separated data from a chat message into JSON for pasting into code.
How it works
  1. 1Pick a direction: CSV → JSON or JSON → CSV.
  2. 2Paste your data into the left panel, or upload a .csv / .json file from your device.
  3. 3Adjust options: headers, delimiter, output style, type inference for CSV → JSON.
  4. 4Watch the right panel update live after a 300 ms debounce, or press Ctrl/Cmd+Enter.
  5. 5Copy the output to your clipboard or download it as a .json or .csv file.
FAQ
What does CSV to JSON do?
It reads your CSV and converts each row into a JSON object, using the header row as keys. The result is a JSON array you can drop directly into a JavaScript array, an API body, or a config file. If you disable the headers option, you get an array of arrays where each row is a raw list of string values.
What does JSON to CSV do?
It takes a JSON array of objects and writes each object as a row in a CSV, with keys becoming column headers. Nested objects are flattened one level deep with dot notation, so {"address": {"city": "NY"}} becomes a column named address.city. Arrays of arrays are also accepted; the first inner array is treated as the header row.
Is my data safe?
Yes. The entire conversion happens in your browser using JavaScript and PapaParse. Nothing is uploaded to a server, no cookies or accounts are required, and the page continues to work offline after it has loaded once. You can verify this in the browser's network tab.
What delimiters are supported?
For CSV input, auto-detection handles comma, semicolon, and tab — useful for European CSVs that use semicolons. You can also lock to a specific delimiter manually. For JSON-to-CSV output, you can choose comma, semicolon, or tab explicitly.
What is type inference?
When inference is on, the converter turns numeric strings into numbers, the strings true and false into booleans, and empty values plus the literal word null into JSON null. It's off by default because implicit conversions can silently break ZIP codes, phone numbers, or IDs with leading zeros. Turn it on only when you know your columns are purely numeric or boolean.
Can I handle nested JSON?
JSON-to-CSV flattens objects one level deep using dot notation. Deeper nesting stays as a JSON string in the cell. For complex nested structures, it is usually better to pre-process the JSON to pick the fields you want, then convert. The JSON Viewer tool is a good pairing for that.
What about large files?
The browser can handle tens of thousands of rows interactively. Above 2 MB of input a warning appears because the live-update rendering can start to feel sluggish. For huge datasets, disable live updates mentally by leaving the input panel untouched and triggering conversion with Ctrl/Cmd+Enter when ready.
Why are my numbers becoming strings?
CSV does not carry types — every value is text. By default this tool preserves that faithfully, so every cell becomes a JSON string. Turn on Infer types to convert numeric-looking strings into real numbers. Be aware this will change leading-zero columns like ZIP codes or phone numbers; keep those as strings.
How are quotes and commas inside cells handled?
CSV's quoting rules are applied correctly in both directions: cells containing commas, newlines, or double-quotes are wrapped in double-quotes, and internal double-quotes are doubled. A CSV that round-trips through this converter remains byte-identical in most cases.
Does this work with Excel files (.xlsx)?
Excel files are a binary format, not CSV. Open the .xlsx in Excel or Google Sheets and save / export as CSV first, then paste here. A dedicated XLSX-to-CSV converter is on the roadmap.