JSON Formatter & Validator

Format, minify, sort, and repair JSON in real time. Automatically detects syntax errors with line numbers and cleans trailing commas locally.

Waiting for input
Samples:
</> Embed this tool on your website / blog No code required · Copy and paste
HTML Embed Code (iframe):
<iframe src="https://lucentool.com/json-formatter" width="100%" height="650" style="border:1px solid #e5e0d8;border-radius:12px;max-width:850px;width:100%;" frameborder="0"></iframe>
<div style="font-size:12px;color:#78716c;margin-top:6px;font-family:sans-serif;">Powered by <a href="https://lucentool.com/json-formatter" target="_blank" style="color:#c85a32;text-decoration:none;">Lucentool - JSON Formatter & Validator</a></div>

Common JSON Syntax Rules & Error Recovery

JSON is a strict data interchange format. Unlike standard JavaScript object literals, RFC 8259 imposes rigid syntactic rules: