CSV to JSON

Convert CSV or TSV rows into JSON records while keeping type handling explicit.

  • Local processing
  • No upload
  • 2 MiB file limit

Processed locally in your browser. Your CSV is read on this device for CSV to JSON's core task and is not uploaded to MeaningKit's server.

No CSV or TSV yet.

How to use

  1. Paste, type or load a CSV or TSV document, from a local file or the built-in sample.
  2. Check the Header row and Delimiter settings against your source.
  3. Turn Convert numbers and Convert true/false on if you want clearly numeric or boolean-looking text converted from strings.
  4. Copy the JSON to your clipboard, or download it as a file.

Worked example

Load the built-in sample to see a small product list, with a price and a note that starts with an equals sign, converted to JSON with numbers and booleans left as text until you choose to convert them.

About the views

Header row: Yes or No

With Header row set to Yes, the first row supplies field names and every other row becomes a JSON object using those names. With Header row set to No, every row — including what would have been the header — becomes a plain JSON array of values in column order, so nothing is renamed or reinterpreted as a field name.

Duplicate and empty column headers

A header used by more than one column keeps its exact text the first time it appears; later columns with the same header get a generated name such as name_2 so every field survives. An empty header is given a generated name such as column_2, based on its position. A generated name never reuses text that belongs to a real header elsewhere in the same row, and a note explains every generated name used.

Rows with too many values

With Header row set to Yes, a row with more values than the header provides names for cannot be turned into an object without guessing at names or leaving values out, so JSON export is turned off until the row is fixed or Header row is set to No, which keeps every value in a plain array instead.

Converting numbers and true/false

Both conversions are off by default and can be turned on independently. Convert numbers only changes text that is unambiguously a plain number, such as 42 or -3.5; text like 01, +1 or 1,234 is left as text. Convert true/false only changes the exact text true or false; TRUE, yes and 1 are left as text. A number that cannot be converted exactly — because it is too large, too small, or would lose precision — is kept as text with a note, rather than silently changed.

Limitations

  • This is a derived JSON document, not the original text: exact spacing and lexical number formatting from the CSV are not preserved.
  • With Header row set to Yes, a duplicate or empty column header is given a deterministic generated name, disclosed in a note; with Header row set to No, every row becomes a plain array instead.
  • A row with more values than the header provides names for turns off JSON export while Header row is set to Yes; switching Header row to No keeps every value in a plain array.
  • Converted numbers use ordinary JavaScript number handling. A number too large, too small, or that would lose precision if converted is kept as text instead, with a note.
  • There is no automatic date conversion: date-looking text is always kept as text.
  • The JSON preview may be shortened for very large results; Copy JSON and Download JSON always use the complete result, not the shortened preview.
  • Copying to your clipboard may normalise line endings in the JSON text, depending on your browser and operating system. Use Download JSON if exact line-ending preservation matters.
  • There is no sorting, filtering or editing. The previews are read-only.

Privacy and accessibility

Privacy

Your CSV or TSV and generated JSON stay on this device during normal use. MeaningKit does not intentionally send source content, filenames or export contents to its servers for processing. Read the privacy page.

Accessibility

The CSV preview uses a real HTML table with column headers, the JSON preview is a readable text region, and every control, including Copy JSON and Download JSON, works with a keyboard. Read the accessibility page.