Formats

CSV → JSON

Convert CSV data to JSON format.

How to use it

  1. Open Devly from the wrench in your menu bar, or press ⌃⌥⌘D. Press ⌘P, type CSV → JSON and press Return.
  2. Paste or type your text into Input.
  3. Adjust the Options on the right if you need to. The defaults are listed below.
  4. Press Convert, or ⌘↵.
  5. Use Copy or ⇧⌘C to copy the result. ⌘L clears everything.

Options

OptionValuesDefault
DelimiterField separator characterAuto-detect, Comma (,), Semicolon (;), Tab, Pipe (|)Auto-detect
First row is headersUse first row as property namesOn or offOn
Parse numbersConvert numeric strings to numbersOn or offOn
Trim whitespaceRemove leading/trailing spacesOn or offOn
Output FormatJSON structure formatArray of Objects, Array of ArraysArray of Objects

Example

Real output from Devly, with the default options.

Input
name,category,offline
Base64,Encoding,true
JSON Formatter,Formats,true
HTTP Client,Dev Utils,false
[
  {
    "category" : "Encoding",
    "name" : "Base64",
    "offline" : true
  },
  {
    "category" : "Formats",
    "name" : "JSON Formatter",
    "offline" : true
  },
  {
    "category" : "Dev Utils",
    "name" : "HTTP Client",
    "offline" : false
  }
]

From Terminal

With the free command-line tool installed:

Terminal
devly csv2json --path input.txt
# or pipe text in
pbpaste | devly csv2json

Quick Switch also finds it by: csv, json, convert, spreadsheet, table, data.

More Formats tools