JSON Formatter & Validator

Beautify, minify, validate and share JSON instantly. All processing stays in your browser.

RFC 8259 2 spaces 100% in-browser Free forever No login
Indent
Template
Spec
Ctrl+Enter format
Input
Output
Formatted output appears here…
Ready — paste or upload JSON

Free Online JSON Formatter, Validator & Beautifier

KaFinder's JSON Formatter is a fast, privacy-first tool built for developers. Paste any JSON string or upload a .json file and instantly format it with your choice of indentation — 2 spaces, 3 spaces, 4 spaces, tabs, or compact. Everything runs 100% in your browser; your data never touches our servers.

The validator follows RFC 8259 (the official IETF JSON Internet Standard) and reports errors with exact position info. Switch to JSON5 for relaxed parsing that allows single-quoted strings, comments and trailing commas. Use JSONC mode for VS Code-style configs with // line and /* block */ comments.

Additional features: sort all keys alphabetically, minify for production, escape/unescape JSON strings, generate a shareable URL, and download the result as a .json file.

What is RFC 8259?
RFC 8259 is the official IETF Internet Standard for JSON, published in December 2017. It requires double-quoted keys, forbids trailing commas, and disallows NaN and Infinity. All modern REST APIs conform to this standard.
How do I format JSON with 4-space indentation?
Click the 4 button in the Indent control in the toolbar above the editor, then click Format & Validate. You can also press Ctrl+Enter as a shortcut.
Can I upload a JSON file directly?
Yes. Click the Upload button in the input pane header to open a file picker. You can also drag and drop any .json or .txt file directly onto the input textarea. Files are read locally in-browser — nothing is uploaded to any server.
What is the difference between JSON5 and JSONC?
JSON5 is a superset that adds single-quoted strings, unquoted keys, trailing commas, hex literals, and multiline strings. JSONC (JSON with Comments) only adds // and /* */ comments — it's the format used by tsconfig.json, VS Code settings, and ESLint configs.
How does the Share URL feature work?
The Share button encodes your JSON as a Base64 string and appends it to the page URL as a query parameter. You can send this URL to anyone and they'll see your JSON pre-loaded and formatted. Works for JSON up to ~6 KB.
Is my data safe and private?
Completely. This tool runs entirely in JavaScript in your browser. No JSON data is ever sent to KaFinder's servers. You can even use it offline after the initial page load.