After trying to search around for a quick, free, and easy way to convert JSON data into a CSV I came up empty handed. So I started working on a solution: JSON2CSV. That’s all it does. Takes JSON data either through POST data or file upload. It then spits out a CSV with your data. CSVs can also be opened in Excel which you can then save as a xls or xlsx file. It’s up on GitHub and you’re welcome to do whatever you’d like to do with it: github.com/danmandle/JSON2CSV
Update! (2/2/2013) I’ve modified the script to work from the command line as well. Simply execute the code below in a Mac/*nix terminal:
php json2csv.php --file=/path/to/source/file.json --dest=/path/to/destination/file.csv
Update! (6/23/2013) CSVs now have headers! The key name for the field is now the first row of the CSV.
Update! (7/24/2013) There’s now basic error handling for invalid JSON or JSON with nested elements.
But if you don’t want to download it…
You can use it here. You can either paste the JSON data into form below or you can upload a file with the JSON data.
NOTE: This script does not currently support nested or multidimensional arrays.
Be sure to validate your JSON before using the tool at JSONlint.com.