58

I have very large JSON file which is of several GB. I am looking for any efficient JSON viewer. In which we are also able to view JSON in tree format.

I understand such huge file can't be loaded in one go. I wonder is there any software to view JSON in parts (i.e opening ~10k records) at a time?

Community
  • 1
  • 1
Anwar Shaikh
  • 1,591
  • 3
  • 22
  • 43
  • 1
    You could (not sure) use MongoDb to store it an d query it – X.Otano Nov 02 '15 at 07:05
  • 4
    How large is it and how much RAM do you have? I'm currently working on [Huge JSON viewer](http://development.wellisolutions.de/huge-json-viewer/) – Thomas Weller Jul 15 '16 at 22:13
  • On Windows I used Notepad++ to load a 468MB JSON. The loading took some minutes. Then I formatted the single line JSON with the JSON Viewer Plugin. When additionally setting the read-only mode for the file, then scrolling though the 26 million lines is quite fast. – phi Feb 22 '19 at 07:54
  • 2
    Main problem is when the JSON is all on a single line. Use jq to format it first, then open that: `jq . < bigline.json > formatted.json`. For me, this solved the problem in most editors. – Rich Remer Jan 19 '20 at 05:04
  • 4
    Have you tried https://viewer.dadroit.com/ is fast and light. – nahog Jun 09 '20 at 16:18
  • My AV is showing it as virus – Abhishek Oct 12 '20 at 11:56
  • 3
    Dadroit is a brilliant tool that treats JSON as a data format, not plain text. It provides you with a quick outline view with the help of tree representation of JSON data from root to last nodes. You can browse and query JSON like an enterprise DBMS. You can get it here https://dadroit.com/ – Point Networks Nov 24 '21 at 11:53
  • 1
    Dadroit should be the accepted answer. It is much faster than the others and shows the data in a readable format – endolith Sep 18 '22 at 13:25

3 Answers3

20

You can try Sublime. Its quite good in handling large files:

Leo Chapiro
  • 13,678
  • 8
  • 61
  • 92
digitguy
  • 1,014
  • 2
  • 12
  • 29
  • 24
    I haven't done much empirical testing, but in my experience, Sublime seems to struggle with minified files. It handles large files with many reasonably short lines passably, but it chokes on a 50 MB JSON one-liner. – Illya Moskvin Dec 02 '16 at 10:08
  • 10
    In my experience, Sublime has to chug for a while before it can finally open large files. I just opened a 50MB JSON file in Sublime and it took several minutes before the file appeared in the editor. – Bob Black Mar 20 '17 at 19:21
  • 21
    been sitting here for 20 or 25 minutes waiting for sublime to open this geoJSON file.... 120MB – Gukki5 Aug 04 '17 at 06:58
  • For a 5MB file, I just open the Chrome console and do `x = {"huge_json": "asdf"}` – crizCraig Nov 20 '18 at 04:08
  • Works for a 15 MB file that made VS Code's extension manager crash and is very sluggish in Notepad++. – AndyO Oct 05 '19 at 12:23
  • 3
    Dadroit is a brilliant tool that treats JSON as a data format, not plain text. It provides you with a quick outline view with the help of tree representation of JSON data from root to last nodes. You can browse and query JSON like an enterprise DBMS. You can get it here dadroit.com – Point Networks Nov 24 '21 at 11:53
  • 1
    Try this https://github.com/WelliSolutions/HugeJsonViewer – Lord Darth Vader Dec 13 '21 at 20:16
  • @PointNetworks Post that as an answer, or I will. It opens 370 MB single-line json file in seconds and displays it in a readable format. – endolith Sep 09 '22 at 23:40
  • @LordDarthVader It takes a very long time to open a 370 MB file. – endolith Sep 10 '22 at 00:06
20

If you're using Mac, try Hex Fiend. Loads large files super fast. Just disable the hex view and you'll get a regular-ish editor.

raven
  • 18,004
  • 16
  • 81
  • 112
captain
  • 815
  • 14
  • 26
4

I've used JSONViewer to view large files (over 100Mb). It's not all that fast at loading them, but it gets there eventually.

Chris Rae
  • 5,627
  • 2
  • 36
  • 51
  • 3
    Unpopular solution but Works like charm : Try out *nano* if you are using Linux. It will read only that part of the file which is displayed on the terminal. Loads super fast!! and does not blow up memory requirement. If you are good at python just use file.read() option to parse only that part you need Unpopular solution but Works like charm : Try out *nano* if you are using Linux. It will read only that part of the file which is displayed on the terminal. Loads super fast!! and does not blow up memory requirement. If you are good at python just use file.read() option to parse only – Trect Nov 05 '19 at 15:54
  • 6
    Just tried it and it is decades away from "fast". Honestly, after 15 minutes of waiting I believe it entirely froze to death. My test scenario: HP Elitebook 745 G2 with Win 10 Pro and 4GB DDR3, SSD HDD (1TB) - Notepad++ opened it way faster. Everything was shown in one row only but it did the job in my case as I only needed to search for a contained string. Maybe this comment saves somebody some time. – Chris S. Jul 01 '20 at 00:35
  • Link not working anymore, where it can be found? – BRap Apr 20 '23 at 08:34