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
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
javascript - Is there an online JSON viewer/formatter that can show the path to an attribute? - Stack Overflow
There are a lot of good online JSON viewers where I can paste in the structure & it'll pretty-print it.. but one thing I'd find useful (for complex JSON structures) is to be able to click on an More on stackoverflow.com
🌐 stackoverflow.com
[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 26, 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.
🌐
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
🌐
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
🌐
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.
🌐
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.
🌐
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-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.
🌐
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.
🌐
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.
🌐
Jsononline
jsononline.net β€Ί json-viewer
JSON Viewer - Free Tool to View and Edit JSON Code Online
You can use our JSON viewer to display the results of your coding and to manage the stored data without using any external software. After accessing this tool, you will see a box where you can start writing or paste the JSON code. The tool also allows you to upload the JSON file stored on your device or paste the code or enter a URL to fetch JSON.
🌐
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.
🌐
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.
🌐
CodeBeautify
codebeautify.org β€Ί jsonviewer
Best JSON Viewer and JSON Beautifier Online
Step 2: Select the JSON file. This tool will show the JSON in the parent node tree. Please select the Big Num check box to enable large numbers for JSON beautify to a considerable number. By default, this tool uses the browser's JSON library for beautification. Know more about JSON.