JSON Extraction to CSV or Excel (2024)

The JSON data format is widely used in web applications and data handling, wherefore it is very likely at some point to get data in this format when harvesting, collecting or accessessing web data. For example, several of the results that may be retrieved with the service YouTube Data Tools from Digital Methods Initiative will be in the JSON format.

JSON stands for JavaScript Object Notation. The JSON data format is coded in a way that includes relations between data, e.g. arrays or sequences.

Although the format is designed to "be easy for humans to read and write" there are very few application that can readily read or analyse this data format for research purposes.

So if or when you have retrieved a dataset in the JSON format, you will very likely benefit from transforming the data to another format: CSV. Or if possible, to Excel or other spreadsheet format which can then be cleaned and edited, and then converted to CSV if needed.

When one goes about to extract JSON data to other formats such as CSV or Excel, first of all remember:

Always store your original dataset for as long as it may be needed for your research!
The JSON file(s) you have originally harvested are a more complex and detailed data format than a CSV or Excel file, and should be stored. If errors occur, or if a specific category of information what should be available has not been translated correctly into another format, the original dataset may still be needed.

Recommended solution:

The application OpenRefine is the best all-round tool for working with and converting JSON files.

Depending on your amount of data and on the specific JSOn file other solutions may prove easier, or necessary.
But in most cases with larger data sets OpenRefine is the best solution, both in respect of handling the JSON files (including subtypes like JSONL (JSON in a line-based format)), and in respect of extracting the data to other formats.

CDMM Instruction Video: Converting JSON to Excel in OpenRefine

Service: OpenRefine

Converting from JSON to Excel on Windows

Some versions of Excel on Windows can import JSON files directly. This is a good solution if accessible, but this will depend on the Excel version you are running if you are a Windows user. The same functionality is unavailable in any version of Excel on Mac.

If you have access to a Windows machine with MS Office, you may check if this conversion can be done by following these steps:

1) Create an Excel Spreadsheet with an appropriate name.

2) In the empty spreadsheet go to the data tab, and select “From Text”.

3) In the path finder window browsing for the file to import, change the search from “Text Files (*.pm; *.txt; *.csv)” to “All Files (*.*). If the feature is available in your Excel version, this will now allow you to point to the JSON (or JSONL) file that you wish to import. If not, the you will have to proceed with a JSOn to CSV conversion, as described in the section below.

4) Select your data file and click “Import”.

5) The Text Import Wizard now opens. “Delimited” (by commas, etc.) should be marked by default.

6) Tick the line saying “My data has headers.”

7) In “File Origin” (which will likely state “OEM: Unites States”), scroll down and select “65001: Unicode (UTF-8). (This is to avoid unnecessary character mismatches in the import, as discussed in the last chapter, “Basic Data Cleaning for Character Endocing Conflicts”).

8) Press “Next” which will take you to “Text Import Wizard – Step 2 of 3”.

9) Deselect the tick-off in “Tab” and tick off “Comma” instead. (Note what happens in the scrollable preview window if in doubt).

9) Press “Next” to go to the last Import Wizard window. The default settings here (“General”) should work, so press “Finish” and the import starts. (With large datasets Excel will have to work a while. A progress bar will be visible at the bottom).

Converting from JSON to CSV

There are several ways to convert JSON files to CSV files.

Unfortunately, most are either rather technical and will require further installations, and further use of command lines – versus those that are easier to use, but which cannot handle datasets of all sizes - notably very large datasets.

An online JSON to CSV converter which is recommended by Twitter is listed below. Provided that your dataset does not exceed the limitations of the converter, this will be a rather easy and comfortable way to get a CSV version of you dataset, so it is recommended to try. (The exact limitation is not specified).

For example, the online converter mentioned in Twitters tutorial (see below) will have trouble with large files, and it also seems that it – and other online converters tested – cannot recognise the “.jsonl” format harvested with twarc2. (However, since a JSONL file is a JSON file with the "L" specyfing the internal data format, JSONL files may be renamed to simply JSON. Just remember to rename it to JSONL (or keep a backup with the original file extension) because other programs expect the "L").

Finally, if a dataset proves too large to convert by any of the above means, you may have to look into command line programs for the conversion. This kind of solution will be powerful, but it will also demand high IT skills and/or patience for at steep learning curve.

For good measure, if for example you want to experiment with the more advanced options, please refer to Twitters guide on various methods for JSON to CSV conversion:

https://developer.twitter.com/en/docs/tutorials/five-ways-to-convert-a-json-object-to-csv

Online JSON to CSV converter by Eric Mill: https://konklone.io/json/

JSONKit (a command line application): https://github.com/johnezang/JSONKit

JSON Extraction to CSV or Excel (2024)
Top Articles
Best Digital Wallets For Bnb Smart Chains
Factors of 27 by Prime Factorization Method & Factor Tree Method
Craigslist San Francisco Bay
Canary im Test: Ein All-in-One Überwachungssystem? - HouseControllers
How Much Does Dr Pol Charge To Deliver A Calf
Workday Latech Edu
Jesus Revolution Showtimes Near Chisholm Trail 8
Weather In Moon Township 10 Days
Anki Fsrs
Craigslist Pets Southern Md
Washington, D.C. - Capital, Founding, Monumental
Pwc Transparency Report
6001 Canadian Ct Orlando Fl
Craigslist Mpls Cars And Trucks
Becu Turbotax Discount Code
Eva Mastromatteo Erie Pa
Navy Female Prt Standards 30 34
Delaware Skip The Games
eHerkenning (eID) | KPN Zakelijk
Parc Soleil Drowning
Shoe Station Store Locator
Discord Nuker Bot Invite
R/Airforcerecruits
Tottenham Blog Aggregator
Big Boobs Indian Photos
Shoe Station Store Locator
Our Leadership
Nurofen 400mg Tabletten (24 stuks) | De Online Drogist
Wcostream Attack On Titan
2487872771
Chattanooga Booking Report
Craigslist Albany Ny Garage Sales
Movies123.Pick
Giantess Feet Deviantart
19 Best Seafood Restaurants in San Antonio - The Texas Tasty
2008 DODGE RAM diesel for sale - Gladstone, OR - craigslist
Paperless Employee/Kiewit Pay Statements
Craigslist Com Panama City Fl
Conan Exiles Armor Flexibility Kit
Deepwoken: How To Unlock All Fighting Styles Guide - Item Level Gaming
Gabrielle Abbate Obituary
N33.Ultipro
Access to Delta Websites for Retirees
Playboi Carti Heardle
Dancing Bear - House Party! ID ? Brunette in hardcore action
Scott Surratt Salary
Mcoc Black Panther
Workday Latech Edu
Latina Webcam Lesbian
Laura Houston Wbap
Where To Find Mega Ring In Pokemon Radical Red
Unbiased Thrive Cat Food Review In 2024 - Cats.com
Latest Posts
Article information

Author: Jamar Nader

Last Updated:

Views: 6091

Rating: 4.4 / 5 (55 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Jamar Nader

Birthday: 1995-02-28

Address: Apt. 536 6162 Reichel Greens, Port Zackaryside, CT 22682-9804

Phone: +9958384818317

Job: IT Representative

Hobby: Scrapbooking, Hiking, Hunting, Kite flying, Blacksmithing, Video gaming, Foraging

Introduction: My name is Jamar Nader, I am a fine, shiny, colorful, bright, nice, perfect, curious person who loves writing and wants to share my knowledge and understanding with you.