格式化与代码
JSON5 格式化工具
免费的 JSON5 格式化工具。接受带注释、尾随逗号及其他宽松语法的 JSON,然后输出严格的 JSON。适用于偏离规范的配置文件。
Runs in your browser
JSON5 formatter & validator
lines: 0chars: 0size: 0 B
JSON5 · UTF-8 · 2-space indent
编辑注
Understanding · JSON for humans.
本深度章节目前仅有英文版本。上方的转换工具支持您的语言;长篇说明文章尚未翻译。
常见问题
Quick answers.
›What is JSON5?
A superset of JSON that allows comments, trailing commas, unquoted keys and a few other conveniences. It's the format of many config files (tsconfig, devcontainer, babel) and drift-prone hand-edited JSON.
›Does it handle single-quoted strings?
This tool handles the most common JSON5 drift — `// comments`, `/* block comments */` and trailing commas. For the full JSON5 spec (unquoted keys, single quotes, hex numbers) paste into a proper JSON5 parser locally.
›What does the output look like?
Strict, spec-compliant JSON — 2-space indented. Safe to feed to any JSON.parse or schema validator.
›Is it free?
Yes — fully free, in-browser, no signup.
大家也在搜索
相关工具