HPJson:高性能 JSON 格式化与对比工具
HPJson(HighPerformanceJson)在浏览器本地完成 JSON 解析、格式化、搜索和结构化对比,不上传任何数据;验证过 100 MB 级别的超大文件,并提供可完全离线的单文件版本。
主要功能
- 原地格式化:保留原始文本,按需折叠 / 展开,支持按层级折叠。
- 原文与格式化并排:左侧是带软折行的原文阅读器,右侧是格式化树。
- 结构化 JSON Diff:对象按键对齐、数组按下标比较,红删绿增,并支持上一处 / 下一处跳转。
- 大文件:解析、搜索、Diff 和长文本索引都在 Web Worker 中执行,界面只渲染视口附近的行;已验证 100 MB 级别文件。
- 中英文界面:首次访问按浏览器语言和系统时区选择,之后记住你的选择。
- 离线可用:桌面单文件版可以直接双击打开,不需要网络。
隐私与数据安全
HPJson 不会上传你的 JSON。网站版的所有处理都在浏览器内完成,没有任何把文件发送到服务器的请求;单文件离线版则完全不联网。你可以用浏览器开发者工具的 Network 面板自行验证。
常见问题
HPJson 是什么?
HPJson(HighPerformanceJson)是一个高性能 JSON 格式化、查看与结构对比工具。解析、搜索、Diff 和长文本索引都在浏览器 Web Worker 中执行,界面只渲染视口附近的行。
使用 HPJson 需要联网或上传数据吗?
不需要。网站版所有处理都在浏览器本地完成,不上传 JSON;桌面单文件版可以完全离线运行。
HPJson 支持多大的 JSON 文件?
已在 macOS、16 GB 内存的 Chrome 中测试 102.7 MB 密集对象和 100 MB 单字符串字段;超大文本使用虚拟滚动和完整值阅读器,避免一次性渲染。
如何对比两份 JSON?
切换到 JSON Diff 模式,粘贴或打开左右两份 JSON,点击开始对比。对象按键对齐、数组按下标比较,红删绿增,并支持上一处 / 下一处跳转。
为什么比普通在线格式化工具快?
HPJson 不在解析时复制每个字段的内容,而是保留完整原文并用紧凑索引描述结构;格式化、搜索和 Diff 在后台 Worker 中运行,列表使用固定行高的虚拟滚动,只渲染当前视口附近的行。
About HPJson
HPJson (HighPerformanceJson) is a fast JSON formatter, viewer and structural diff tool that runs entirely in your browser. It never uploads your data, handles files around 100 MB in our tests, and is also available as a fully offline single-file app.
Features
- In-place JSON formatting with collapse levels and a virtualized tree.
- Original text and formatted view side by side, with soft-wrapped long lines.
- Structural JSON diff aligned by object keys and array indexes, with previous / next change navigation.
- Parsing, search and diff run in Web Workers; only rows near the viewport are rendered.
- Chinese and English interface, remembered across visits.
FAQ
Is my JSON uploaded?
No. Everything is processed locally in your browser. The desktop single-file version works completely offline.
How large a file can it handle?
We have verified files around 100 MB, including dense objects and single huge string fields, using virtual scrolling and a dedicated full-value reader.
How do I compare two JSON files?
Switch to JSON Diff, paste or open both sides, and press Compare. Objects are aligned by key, arrays by index, deletions are red and additions green.