How large a JSON file can a browser handle
Bottom line: There is no fixed limit; the constraint is your tab's memory budget. A 20MB file typically becomes 60–100MB once parsed, and the highlighted DOM can double that again.

Bottom line: there is no fixed ceiling — estimate from memory, since the parsed object usually costs 3–5 times the text size and the highlighted DOM doubles it again; above 50MB, or when the top-level record count runs into the hundreds of thousands, slice, stream or switch to a local app instead of forcing it in a tab.
Where the memory goes
A 20MB JSON text exists three times over:
- The raw string: 20MB
- The parsed object graph: usually 60–100MB (duplicated strings, object headers, hash tables)
- The highlighted DOM: one node per token, easily another 2x
Editor buffers, undo stacks and syntax-highlight caches are extra. A "20MB file" can exceed 200MB resident.
Rules of thumb
| Size | Desktop | Mobile |
|---|---|---|
| < 5MB | Smooth | Smooth |
| 5–20MB | Slight lag, 1–3s to format | Noticeable lag, may freeze |
| 20–50MB | Workable but heavy; turn off highlighting | Likely crash |
| > 50MB | Not recommended | Not usable |
These shift with device, browser version and whether highlighting is on. Use them for orders of magnitude, not as guarantees.
Why more RAM does not fix it
Tabs have a hard limit, and exceeding it means an immediate crash rather than graceful degradation. Mobile is stricter still, reclaiming in the low hundreds of megabytes.
Working with large files
Slice it.
head -c 1048576 big.json | jq .
jq '.items[0:100]' big.json
Stream it. stream-json, ijson, jq --stream process record by record with memory independent of file size.
Use a local app. No tab limits, full machine memory: desktop download.
Change the format. Logs and event streams should be NDJSON from the start — one record per line, streamable by construction.
Ask the backend to trim. If the UI needs three fields, sending three hundred is an API design problem, not a browser limitation.
Sizing up your file
ls -lh data.json
jq 'length' data.json
If length is in the hundreds of thousands, pagination or streaming is the answer regardless of byte size.
FAQ
How do I tell which size band my file falls into?
Check the bytes with ls -lh and the top-level record count with jq 'length'. Files under a few megabytes are smooth anywhere, 20–50MB works on desktop but stutters, and above 50MB you should stream or use a command-line tool.
What should I do with a file over 50MB?
Slice it with head -c, or stream it with jq, stream-json or jq --stream so memory stays independent of file size. If you need to inspect the whole document, use the desktop app, which is not bound by a tab's memory budget. Logs and event streams belong in NDJSON anyway.