JSON 体积分析
交互式树图分析 JSON 大小分布
JSON Input
Size Breakdown
Find out exactly which keys make your payload heavy
Slow APIs and large databases often boil down to one or two oversized fields buried in an otherwise lean payload. A size analyzer breaks the document down by byte contribution and visualizes it as a treemap, so you can see at a glance which keys deserve attention before deciding what to trim, paginate, or move out of JSON entirely.
Use the analyzer when you need to
Diagnose a slow API response
Identify the field consuming most of the payload before you optimize, paginate, or compress.
Audit a stored document
See which keys take up the most room in a NoSQL or document-database record.
Plan a payload-shrinking effort
Prioritize the highest-impact fields to remove or compress instead of micro-optimizing small ones.
How to analyze JSON size
- 1
Paste the JSON document into the editor.
- 2
Click Analyze to break the document down by key with byte counts.
- 3
Hover or click the treemap to drill into the biggest contributors.
Keep going
Minify the payload
Strip whitespace as a first cheap optimization before refactoring fields.
Visualize as a graph
Switch to graph view when relationships matter more than size.
Inspect specific fields
Drill into a heavy node in tree view to decide how to slim it down.
Format before analyzing
Pretty-print the source so the labels in the analyzer match what you expect.
Common size-analysis workflows
Identify the biggest fields and either trim, paginate, or move them out of the response body.
See which embedded subdocuments are pushing rows over storage limits.
Compare the breakdown before and after a refactor to confirm the savings landed where expected.
相关工具
常见问题
它会按“体积”拆解你的 JSON,告诉你哪些 key/值占用了最多字节。交互式 treemap 让你很容易定位超大的字段、冗余数据和可优化点。
按去掉空白后的 minified JSON 表示计算字节数。这更接近网络传输时的实际 payload 大小,也最能反映 API 性能影响。
先找出最大的字段,然后考虑:删除不用的字段、在 API 响应中缩短 key 名、把大块二进制数据(图片等)从 JSON 挪到独立接口、对数组做分页、以及在服务端启用 GZIP 压缩。
Web API 通常建议控制在 100KB 以内;移动优先的 API 更建议 50KB 以内。超过 1MB 的响应通常需要分页或重构。启用 GZIP 后一般能把 JSON 体积减少 70-90%。