Working with very large JSON files (20MB+) using online tools tends to be a crashy affair. Whether you’re looking to format or search them, all the tools I found just crash. I found myself having to work with huge JSON files recently, so I built a tool specifically optimized for huge JSON files, called Huge JSON Viewer (https://hugejson.chofter.com/).

Why does it not break like other JSON viewers?

It scales to very large and deeply nested JSON files using a few optimizations

  • No attempt to do syntax highlighting
  • All large operations take place in web workers.
  • Search results are rendered using a virtualized list, so it can easily scale to thousands of search results.
  • Some fancy algorithms for stringifying deeply nested files that break JSON.stringify (slower, but at least they don’t crash!)

What can it do?

I’m glad you asked! It’s focused on useful and fast search operations. It has three search modes:

  • Simple text search
  • JSON Path queries, when you know the path to the data you’re looking for.
  • JQ searches, for more advanced queries.

Simple Text Search

This does what it sounds like, you type in a text prompt and it finds all occurrences of that string in the file.

JSON Path Search

When you know the path to the data you want, Huge JSON Viewer will find it for you. A nice little touch is that when you click on any search result, it scrolls to the matching position in the left pane and highlights it so you can see the context of the data around the search result.

JQ Search

JQ is like sed but for JSON data. If you already know how to use JQ, great, you’re off to a good start! If not, Huge JSON Viewer makes it really easy to get started.

It provides:

  • A step by step UI builder that let’s you construct a JQ search string visually.
  • A list of commonly used queries which will most likely get you what you want
  • The ability to save your commonly used queries locally so you don’t have to remember them by heart.

Code

The code for this is all open source and available at https://github.com/shaneosullivan/hugejson, pull requests welcome!