Search Huge JSON files on the web without crashing

3 days ago 1

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.vercel.app).

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!

Unknown's avatar

Published by Shane O'Sullivan

I am a software engineer and manager from Ireland. I spent 7 years working in Ireland from 2003 – 2010, then ten years in Silicon Valley from 2010 to 2020. In California I spent about 6.5 years at Facebook Engineering, the last three of which I was an engineering manager in the Ads organisation focusing on customer facing products for creating and managing ads. At Stripe I built the Developer Productivity organisation, with teams that were responsible for the use of the Ruby language, testing infrastructure, documentation, developer tooling (e.g. IDE integrations) and more. At Promise, I was Head of Engineering from 2018 – 2020, responsible for building the first few iterations of our products, hiring for all product roles, meeting with clients and investors, and anything else needed to get a tiny startup bootstrapped and successful. Now I’m back in Ireland, working on my next company. Coming soon (as of early 2023!). This blog contains my various musings on all things technical/interesting on the interweb and beyond.

Published June 16, 2025June 16, 2025

Read Entire Article