How to Import JSON in Google Sheets (Quick & Easy Guide)

In this tutorial, we will show you How to Import JSON in Google Sheets using a free, open-source script that is accessible on GitHub.

To open JSON in Google Sheets you can follow the below steps :

  • Open your Google Sheet
  • Open the Script Editor by clicking on  Extensions > Apps Script
  • Delete the placeholder content on the script editor
  • Copy the open-source script and paste it into the Editor.
  • Save and Specify a name for the Project
  • Now Switch back to your Google Sheet
  • Add JSON API URL
  • Import the JSON data

Let’s go through the above steps in detail.

How to Import JSON in Google Sheets: Step-by-Step Guide

Enclosed are the steps to Import JSON in Google Sheets

Using open-source ImportJSON script

Step 1: Open your Google Sheet

Open a new or existing Google Sheet where you need to import a JSON file.

To quickly open a new sheet you can also type sheets. new on your browser.

Step 2: Open the Script Editor

Go to the Main menu on Google Sheets and Click on  Extensions > Apps Script

In your Google sheet, in the menu at the top, click Extensions > Apps Script

Step 3:  Delete the placeholder content on the script editor.

You can delete any placeholder code that was entered in the script editor.

Step 4: Copy the open-source script and paste it into the Editor.

Go to the following link: https://gist.github.com/paulgambill/cacd19da95a1421d3164

Copy the entire  “import_json_appsscript.js script and paste it into your Google Sheet’s script editor.

To import JSON into a Google Sheet, Paul Gambill wrote a free, open-source tool.

Paste it on the Script Editor

Step 5: Save and Specify a name for the Project

After pasting the entire script into the script editor, save it by selecting the save option and giving your project a name.

To save and provide a name to your project click on the Save project button

Specify your project name.

The project can have any name you choose, but something like “Import JSON file” will be easy to remember.

Step 6: Now Switch back to your Google Sheet

You can now come out of the script editor tab in your browser and return to your Google Sheet after saving your project there.

You may now select “ImportJSON” from a pop-up menu by typing “=import” (without quotation marks) in any cell of your Google Sheet. The script that you saved in the script editor is this one.

Simply Choose any cell, go to the function area, and type following

=import
Import JSON in Google Sheets
Import JSON Syntax

Step 7: Add JSON API URL

You must provide your JSON API URL after launching your Import JSON formula.

You can pick one of these to test with if you wish to use a free JSON API URL:

  • Chuck Norris Jokes: https://api.chucknorris.io/jokes/random
  • Current price of Ethereum: https://api.coinbase.com/v2/prices/ETH-USD/buy

Type the URL in the following format :

=ImportJSON("https://api.example.com")

The URL should be enclosed in “quotes,” and the quotations should be enclosed in parentheses.

You would specify your endpoint and add any additional parameters to fetch the data you require in the URL.

Step 8: Import the JSON data

After adding your JSON URL to your Google Sheet, the last and most important step to import JSON is to press the enter key on your keyboard and wait for the JSON data to fill your spreadsheet.

Provide your JSON URL and hit Enter

Your JSON data has been successfully imported into Google Sheets.

How to Import JSON in Google Sheets(Conclusion)

In this tutorial, we have shown you how using a simple app script you can quickly import JSON in Google Sheets.

We hope this tutorial on How to Import JSON in Google Sheets was useful.

Related articles :

How to Convert Numbers to Strings in Google Sheets(Quick & Easy Guide)

How to Calculate Average If Cell Contains Text in Google Sheets

How to Combine First and Last name in Google Sheets(Quick & Easy Guide)

How to Round to Significant Figures in Google Sheets(Quick & Easy Guide)