TFT

CSV to JSON Converter

Paste CSV or upload a file and get a clean JSON array of objects. Optionally infer numbers and booleans, or build nested objects from dot-notation headers. Everything runs in your browser.

Drag and drop a CSV file here, or click to browse

or paste CSV data below

Convert numbers and booleans automatically

Create nested objects from dot notation keys

Output as arrays of values instead of objects

How it works

Paste CSV text or drop a .csv file, then convert. The first row is read as column headers, and every row after it becomes one JSON object keyed by those headers. The result is a pretty-printed array (two-space indentation) that you can copy or download as converted.json.

Parsing is done with a standard CSV parser, so quoted fields, commas inside quotes, and line breaks inside quoted cells are handled correctly. Everything runs in your browser. Your data is not uploaded to a server.

By default every value is kept as a string, exactly as it appears in the file. That is the safest choice, because it never changes data such as ZIP codes or phone numbers with leading zeros. Three options change the output when you need them.

  • Type Inference turns empty cells and the word null into null, true and false (any letter case) into booleans, and anything JavaScript can read as a number into a number. Everything else stays a string.
  • Nested Output splits headers containing dots, so address.city and address.zip become an address object with city and zip inside it.
  • Array Mode outputs each row as a plain array of values instead of an object. It is disabled while Nested Output is on.

When this is useful

A product manager exports a spreadsheet and a developer needs it as seed data for a test database or a mock API. An analyst wants to load a CSV export into a JavaScript or Python script without writing a parser. Someone preparing a bulk import for a document database such as MongoDB needs one JSON object per record.

It is also handy for small configuration or localization tables that are easier to maintain in a spreadsheet but must ship as JSON.

It is not the right tool for converting JSON back to CSV, for very large datasets that should be streamed, or for producing deeply nested documents that need arrays of objects inside a record.

What to know

Type inference is simple and applies to the whole file. A value like 00123 becomes the number 123, and a long numeric ID can lose precision once it is parsed as a number. If a column holds identifiers, leave Type Inference off and convert the numbers in your own code.

Duplicate header names collapse into one key, and the later column wins. Rows shorter than the header row are filled with empty strings. If the rows have uneven lengths, the tool tries to work out a sensible header row, so check the output when your file is irregular.

Nested Output builds objects only. Values such as [1, 2, 3] in a cell remain text, and headers cannot express arrays of objects. The tool expects comma-separated data. For semicolon or tab-delimited files, convert the delimiter first.

Everything is processed in memory, so very large files can slow the page down. Tens of thousands of rows are usually fine. For multi-hundred-megabyte files, use a command-line tool instead.

Common questions

What if my CSV has no header row?

The first row is always used as the keys. Add a header row before converting, or switch on Array Mode to get plain arrays of values.

Why are my numbers in quotes?

Type Inference is off by default, so all values are strings. Turn it on if you want real numbers and booleans.

Does it keep special characters?

Yes. Accented letters, emoji and non-Latin scripts are preserved, and quotes or line breaks inside values are escaped correctly in the JSON.

Is my data sent anywhere?

No. The conversion runs locally in your browser, and the file is never uploaded.