For reading the external Local JSON file (data.json) using javascript, first create your data.json file:

data = '[{"name" : "Ashwin", "age" : "20"},{"name" : "Abhinandan", "age" : "20"}]';

Then,

  1. Mention the path of the json file in the script source along with the javascript file

     <script type="text/javascript" src="data.json"></script>
     <script type="text/javascript" src="javascript.js"></script>
    
  2. Get the Object from the json file

     var mydata = JSON.parse(data);
     alert(mydata[0].name);
     alert(mydata[0].age);
     alert(mydata[1].name);
     alert(mydata[1].age);
    
Answer from Ashfedy on Stack Overflow
🌐
JSON Viewer
jsonviewer.stack.hu
Online JSON Viewer and Formatter
JSON Viewer and Formatter - Convert JSON Strings to a Friendly Readable Format
🌐
GeeksforGeeks
geeksforgeeks.org β€Ί javascript β€Ί read-json-file-using-javascript
Read JSON File Using JavaScript - GeeksforGeeks
The fetch() API retrieves JSON files asynchronously and parses them into JavaScript objects.
Published Β  January 17, 2026
Discussions

javascript - View JSON file in Browser - Stack Overflow
Re-open the *.json file and it should be formatted. ... Firefox 44 includes a built-in JSON viewer (no add-ons required). More on stackoverflow.com
🌐 stackoverflow.com
javascript - Loading local JSON file - Stack Overflow
When you return a JSON string you're already retrieving a javascript object, no need to use eval(). ... You haven't given us enough details. The file test.json doesn't specify any path so it is therefore a relative URI, relative to the location of the page accessing it. More on stackoverflow.com
🌐 stackoverflow.com
How to import and use data from a JSON file (simply)
There are countless ways to do this in JS... What is your use case? Is it just a static file (file path and content doesn't really change) that you just want to import the data into your code? More on reddit.com
🌐 r/learnjavascript
14
0
March 23, 2025
[SHARE] Small JSON viewer project
Nice tool, I use Cyberchef for this. Can be used completely offline and for various string manipulation useful. More on reddit.com
🌐 r/github
2
7
September 22, 2023
🌐
jQuery Script
jqueryscript.net β€Ί blog β€Ί best-json-viewer.html
10 Best JSON Viewer Tools To Format JSON Strings (2026 Update) | jQuery Script
July 24, 2020 - A super lightweight, pure JavaScript JSON formatter / viewer which helps render JSON objects just like a collapsible tree view. ... JSON Formatter is a pure JavaScript plugin used for rendering local JSON objects and/or external JSON files in an elegant way (just like the collapsible tree ...
🌐
freeCodeCamp
freecodecamp.org β€Ί news β€Ί how-to-read-json-file-in-javascript
How to Read a JSON File in JavaScript – Reading JSON in JS
November 7, 2024 - The fetch API is the preferable method to use when we want to read a JSON file either from an external server or local file into our JavaScript file.
🌐
File Viewer Plus
fileviewerplus.com β€Ί open β€Ί json
Open, edit, save, and convert .JSON files with File Viewer Plus.
Open, edit, save, and convert JavaScript Object Notation Files (.json files) with File Viewer Plus.
Find elsewhere
🌐
Oxylabs
oxylabs.io β€Ί blog β€Ί javascript-read-json-file
How to Read JSON Files in JavaScript: Tutorial
Using the Fetch API method, this JavaScript function retrieves a JSON file from a given URL. If the network response is successful, it parses data into a JSON string and displays the results using the displayProducts() method.
🌐
CoreUI
coreui.io β€Ί answers β€Ί how-to-read-a-json-file-in-javascript
How to read a JSON file in JavaScript Β· CoreUI
December 3, 2025 - Learn how to read and parse JSON files in JavaScript using fetch API for loading configuration data and external resources.
🌐
Jsonhero
jsonhero.io
JSON Hero - a beautiful JSON viewer for the web
Quickly view JSON files or selections in JSON Hero, right from VS Code.
🌐
JSON Formatter
jsonformatter.org β€Ί json-viewer
JSON Viewer Online Best and Free
JSON Viewer Online helps to Edit, View, Analyse JSON data along with formatting JSON data. It's very simple and easy way to Edit JSON Data and Share with others. This is also a JSON file Viewer.
🌐
Count Words Free
countwordsfree.com β€Ί jsonviewer
JSON Online Viewer
Our free JSON viewer is the convenient online tool that evaluates decoded characters and display JSON in readable format. You can easily beautify or minify it, so it is more applicable for your application. The main task of our service is to provide simple method of viewing the contents and data of JSON files and strings.
🌐
JSON Formatter
jsonformatter.org β€Ί json-parser
JSON Parser Online to parse JSON
No, we do not store any JSON data. It processes data on a browser, this tool uses JavaScript scripts libraries to parse the data.
🌐
JSON Editor Online
jsoneditoronline.org
JSON Editor Online: edit JSON, format JSON, query JSON
JSON Editor Online is the original and most copied JSON Editor on the web. Use it to view, edit, format, repair, compare, query, transform, validate, and share your JSON data.
🌐
ScrapingBee
scrapingbee.com β€Ί webscraping-questions β€Ί json β€Ί how-to-parse-a-json-file-in-javascript
How to parse a JSON file in JavaScript? | ScrapingBee
In JavaScript, you can parse a JSON string using the JSON.parse() method. A JSON file is essentially a text file containing a JSON string.
🌐
JSON Formatter
jsonformatter.org
Best JSON Formatter and JSON Validator: Online JSON Formatter
It's hassle free, no need to install any software, speedy and secure, it saves time and accessible everywhere. Easy to clean and format JSON. Using JSON Formatter, click on upload button, it will open a popup window to upload files.
🌐
Cloudzenia
cloudzenia.com β€Ί tools β€Ί json-tools β€Ί json-viewer
JSON Viewer - Easily View & Format JSON Data Online - CloudZenia
There are several types of JSON viewers. We have mentioned them below: This tool streamlines the process, allowing users to ensure their JSON is error-free and presented neatly in no time. It's perfect for developers looking to enhance their workflow Β· This Chrome extension is accompanied by many more features that allow you to view and manage the JSON data. This application can view, read, and convert significant JSON files.
🌐
Chrome Web Store
chromewebstore.google.com β€Ί detail β€Ί json-viewer-pro β€Ί eifflpmocdbdmepbjaopkkhbfmdgijcc
JSON Viewer Pro - Chrome Web Store
Core features: βœ… Beautify JSON response from API βœ… Visual representation of JSON with Chart βœ… Depth traversing of JSON property using breadcrumbs βœ… Access or Traverse via JSON Path navigation Prompt βœ… Write custom JSON in Input area βœ… Configurable Content-Type and JSON Content Detection βœ… Ignore particular websites or URLs from rendering βœ… Import local JSON, YAML and XML files supported βœ… Download JSON file using Context Menu βœ… Dark and Light theme supported βœ… Custom CSS supported βœ… Intuitive User Interface βœ… Copy path of any property and value easily βœ… Access JSON in your console using only json keyword #Keywords: jsonFormatter, JSON, JSONChart, JSONViewer, JSONPlayground, JSONEditor, JSONView