💡 JSON 语法高亮(HTML)Highlight JSON
把 JSON 格式化并生成带语法高亮的 HTML(键、字符串、数字、布尔/null 分色),可复制到网页。本地处理。Pretty-print JSON as syntax-highlighted HTML (keys, strings, numbers, booleans/null coloured) for pasting into a page. Processed locally.
使用说明与常见问题How-to & FAQ
「JSON 语法高亮(HTML)」是什么?What is the Highlight JSON tool?
把 JSON 格式化并生成带语法高亮的 HTML(键、字符串、数字、布尔/null 分色),可复制到网页。本地处理。Pretty-print JSON as syntax-highlighted HTML (keys, strings, numbers, booleans/null coloured) for pasting into a page. Processed locally.
如何使用「JSON 语法高亮(HTML)」?How do I use the Highlight JSON tool?
在「JSON 语法高亮(HTML)」中,把内容粘贴或输入到上方输入框,结果会实时显示在下方,点击「复制结果」即可复制。In the Highlight JSON: Paste or type into the input box; the result appears below instantly — click "Copy result" to copy it.
输出是图片吗?Is the output an image?
不是,是 HTML。需要图片请用「JSON 截图」或「JSON 转图片」。No — it is HTML. For an image use Capture JSON Screenshot or Convert JSON to Image.
数字会被改写吗?Are numbers rewritten?
不会。数字按原文高亮:1.50、-1.5e3、12345678901234567890 都保持原样,只是重新缩进。No. Numbers are highlighted as written: 1.50, -1.5e3 and 12345678901234567890 stay as they are; only the indentation changes.
大数字和重复键会怎样?What about big numbers and duplicate keys?
数字按原文保留,不经过 JavaScript 浮点:12345678901234567890、1e400、1.50 原样输出,不会变成 12345678901234567000、Infinity 或 1.5。重复的键按 JSON 规则保留最后一个值,并在结果下方提示是哪个键。语法错误会写出第几行第几列。Numbers are kept exactly as written, with no JavaScript floating-point step: 12345678901234567890, 1e400 and 1.50 come out unchanged instead of 12345678901234567000, Infinity or 1.5. Duplicate keys keep the last value, as JSON parsers do, and a notice below the result names the key. Syntax errors give the line and column.
输入和输出是什么样的?What does the input and output look like?
例如在「JSON 语法高亮(HTML)」中输入 {"a":1,"b":"x","c":true},输出为:<pre style="margin:0;font-family:ui-monospace,Consolas,monospace;font-size:13px…。For example, the Highlight JSON turns the input {"a":1,"b":"x","c":true} into: <pre style="margin:0;font-family:ui-monospace,Consolas,monospace;font-size:13px….
代码或数据会被上传吗?Is my code or data uploaded?
不会。「JSON 语法高亮(HTML)」完全用 JavaScript 在本地运行,适合处理含有密钥、内部接口等敏感内容的数据。No. The Highlight JSON runs entirely in local JavaScript, so it is safe for data containing keys or internal endpoints.
「JSON 语法高亮(HTML)」免费吗?需要注册吗?Is the Highlight JSON free? Do I need an account?
「JSON 语法高亮(HTML)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Highlight JSON is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.