Large JSON and why it hangs everything
A 300 MB file takes five minutes to open and eats several gigabytes of memory. That is not laziness on the part of editor developers; it is a property of the format, and you can get around it only by changing the format.
Why JSON cannot be read in parts
JSON is a single expression. Formally, to be sure a document is valid you have to reach the last bracket. You cannot take the middle of the file and parse it separately: it is unclear what nesting level you are at and whether the text was cut off mid-string.
The consequence is that parsing goes through the whole document and everything ends up in memory. Not as text but as objects, which take several times more.
A practical rule: parsed JSON takes 5–10 times the size of the source file. A 300 MB file is two to three gigabytes of memory, and a browser tab ends right there.
What you can do
- Ask for JSON Lines. If your system or API produces the file, this is the cheapest solution: the format is read line by line and memory does not grow. See JSON Lines (NDJSON).
- Export in pages. Most APIs can return data in portions, so the file never becomes large at all.
- Convert with a streaming parser.
jqand specialized libraries can read JSON as a stream and emit line-by-line output without holding the whole document. - Load it into a database. If volumes like this arrive regularly, a viewer is not the solution you need.
Our limits, stated honestly
Parsing runs in the browser, so the limits are stricter than in a desktop program. Above 128 MB we warn about memory and time. Above 512 MB we refuse to open the file and say why, instead of hanging the tab and losing what you had open next to it.
JSON Lines has no such limits: lines are read one at a time, and the ceiling is five million records.
How to tell in advance that a file is too big
The guideline is simple: take the file size and multiply by eight. If the result is larger than your free RAM, do not open it with anything but a streaming tool.
Look at the structure separately: a 200 MB file of a million small records and a 200 MB file of a thousand huge objects behave differently. The second case is usually heavier because it has deep nesting.
FAQ
Why does VS Code open it while the browser does not?
An editor shows text and highlights syntax without building an object model. As soon as you turn on formatting or folding, it starts to think too.
Would a 64-bit program help?
It removes the address-space ceiling but not the need for memory. You need streaming parsing, not more memory.
Can I look at only the first records of a big file?
With regular JSON, no — parsing goes through the whole file anyway. With JSON Lines, yes, and that is its main virtue.
Free for personal use. Your file is not uploaded to a server. Windows version — 3.5 MB, no installation: details. Organizations: license.