广告
JSON 格式化工具
文件
视图
预览
广告
Make JSON readable, find what’s wrong with it, compare two versions, or shrink it to one line. Paste JSON, or open or drop a file or a whole folder: every change is checked with the exact line and column of any error, and an editable tree lets you open objects and arrays and change keys and values in place. Everything runs in your browser.
The page opens with an example. Paste your own JSON, choose a folder or file, or drop one onto the Preview. A folder lists all its JSON files. Files up to 50 MB are read on your device.
In Edit mode the JSON shows as an editable, coloured tree or as plain text, prettified with 2 spaces, 4 spaces or tabs; Minify puts it on one line. Sort keys A–Z orders object keys. The check box confirms valid JSON or names the line and column of the first error, and Go to error jumps there.
Compare lists every difference between JSON A and B. Find searches keys and values. Save an opened file straight back, Save a copy as a new file, or copy the result.
Paste {"id":12345678901234567890,"tags":["a","b",]} and the check reports the trailing comma on line 1. Remove it and the tree appears, with the JSON spread over lines with 2-space indents, and the id keeps all 20 digits instead of being rounded.
Formatting changes only spaces and line breaks, so numbers, escapes and key order stay as written unless you sort keys. JSON with comments, single quotes or trailing commas is reported as an error with an explanation. Nothing is uploaded.
该页面将打开并提供一个可供尝试的示例。粘贴您自己的 JSON,将 .json 文件或整个文件夹拖放到预览中,或者选择一个,它就会立即格式化。您打开的文件可以直接保存回您的计算机。选择顶部 JSON Prettifier 下的“编辑”或“比较”。在“编辑”中,“视图”将 JSON 显示为树、纯文本(用 2 个空格、4 个空格或制表符进行美化)或缩小在一行上,所有颜色都采用相同的方式;对键 A–Z 进行排序在每个级别对对象键进行排序。底部的行检查每个更改并命名错误的确切行和列。 JSON 以可编辑树的形式打开:双击键或值进行更改、添加、拖动或删除行,以及撤消任何编辑。查找栏搜索键和值,并且复制图标会出现在您选择的行旁边。比较并排显示两个 JSON 文档并列出每个差异。保存文件、保存副本或复制结果。一切都在您的浏览器中运行;没有上传任何内容。
免费,无需注册。文件处理保留在您的设备上;网站分析和广告有单独的隐私选择。