CodeKitHub
English
How to view a huge JSON file without crashing your browser

How to view a huge JSON file without crashing your browser

Published Jul 23, 2026

Pasting a 50MB API dump or a full database export into any browser-based JSON tool — this one included — will make the tab slow down or freeze outright. That’s not a bug in a specific tool, it’s a property of how browsers render text and DOM. Here’s what’s actually happening and how to work around it.

Why big JSON files freeze the browser, not just “load slowly”

Two separate costs stack up:

  1. Parsing cost. JSON.parse on a well-formed 50MB string takes roughly half a second to a couple of seconds on a normal laptop — noticeable, but not the real problem.
  2. Rendering cost. This is the one that actually freezes the tab. If a tool renders the formatted result as a giant block of text (or worse, a collapsible tree with a DOM node per key), the browser has to lay out and paint potentially millions of DOM nodes. This is what makes the tab unresponsive, not the parsing.

So the size limit you’re hitting almost never comes from the JSON spec or the parser — it comes from asking a browser to draw an enormous amount of text or nested UI at once.

The actual workflow for genuinely large files

Don’t open the whole thing anywhere in a browser. Instead:

  1. Extract only the part you need first. If you’re debugging one broken record inside a 200MB dump, you don’t need the other 199MB in front of you. Command-line tools handle this without ever loading the full file into memory the way a browser tab does:
    # pull out one top-level key from a huge file, streaming
    jq '.results[42]' huge-file.json > fragment.json
    
    # or just grep for context around a known string first
    grep -n '"user_id": 88214' huge-file.json
  2. Format only that fragment in the browser. A few KB of extracted JSON formats instantly and is actually readable — this is the same “format only the fragment you care about” habit worth building for any large log or dump, not just this specific error.
  3. If you must inspect structure, not values, run jq 'keys' or jq '. | length' locally first to understand shape before deciding what to extract. You don’t need to see 50,000 array entries to know the array has 50,000 entries.

When a browser tool is genuinely fine

For the vast majority of real debugging — an API response, a config file, a webhook payload — you’re dealing with kilobytes to a few megabytes, not hundreds. In that range, pasting directly into a formatter and getting instant, readable output with exact error locations is faster than reaching for the command line at all. The size where this breaks down is much higher than most people assume; it’s specifically “tens of megabytes and up” that causes real trouble, not “more than a page.”

Quick reference

File size What to do
Under ~5MB Paste directly into a browser formatter — instant, fine
~5–30MB Still workable, but expect a short pause; format only what you need to read
30MB+ Extract the relevant fragment with jq/grep first, format only that

The tool doesn’t need a “large file mode” to fix this — the fix is extracting before you view, which is a workflow change, not a tool limitation.

← Back to Blog