What can this tool do?

  • Choose from the following 5 JSON conversions offered by this tool:
  • CSV to JSON - array of JSON structures matching your CSV, nested JSON via column headers, and JSONLines (MongoDB) mode
  • CSV to Keyed JSON - Generate JSON with the specified key field as the key value to a structure of the remaining fields, also known as an hash table or associative array. If the key field value is unique, then you have "keyvalue" : { object }, otherwise "keyvalue" : [ {object1}, {object2},... ]
  • CSV to JSON Array - An array of CSV values where the CSV values are in an array, or a structure with column names and data as an array
  • CSV to JSON Column Array - An array of CSV values where each column of values are in an array
  • Generate JSON via Template - Using our template engine, easily customize your JSON output NEW
  • Automatic detection of numeric values, logical values, and nulls
  • TSV to JSON

What are my options?

  • Choose your attribute names to be upper or lower case
  • Choose to limit the number of records processed
  • Select the fields to output and also rearrange JSON fields
  • Filter JSON output by using the query tool
  • Create nested JSON output by using / in the column headings of CSV. Arrays are created from duplicate column names or /0, /1, ... in the heading. See Output Options NEW
  • Sort CSV data in ascending or descending order before converting to JSON
  • Convert value of NULL in CSV to be null in JSON
  • Optionally output null instead of "" for empty fields
  • Optionally do not write out field : value if field value is empty. See Output Options
  • Terse Mode and Json Lines Mode - one object per line with no commas separating objects.
  • Add top level name property name to JSON output NEW See Output Options

What else?

  • See also JSON to CSV and CSV To GeoJSON
  • Convert JSON to XML and XML to JSON at ConvertJSON.com NEW

Step 1: Select your input


Step 2: Choose input options (optional)


Input Options
Limit # of lines: Skip # of Lines Field Separator:

Step 3: Choose output options (optional)


Output Options
Display which field positions? (Comma separated list where 1 is 1st field, 2=2nd,... i.e. 2,1,3,4)
 
Sort CSV  
 Field #TypeDirection
First By
Then By
Then By
Comma separated, leave blank for all
Add Top Level Property Name
If to Keyed JSON, which field # is key? (Default 1)
name = and Data name =
(Headings use /)
, plus no commas in between
Comma separated, leave blank for all

Step 4: Create Custom Output via Template (optional)


Modify template below and Press Convert
See also CSV Templates
Enter your template below and press the Convert button below.
Top
Repeating Section for each Line of CSV
Bottom

Step 5: Generate output


Choose Conversion Type:



.json

You can Save the complete data and settings, and then later Load them from your saved file.