Output will appear here
About
The JSON Formatter, Validator & Linter gives you four tools in one: Lint catches and describes every syntax error (trailing commas, unquoted keys, mismatched brackets); Format re-indents your JSON with consistent spacing; Pretty Print produces human-readable output with collapsible nodes; and Validate checks your document against the full JSON specification. A Sort Keys option lets you alphabetically sort all object keys at every nesting level — handy for diffing configs. Every operation runs entirely in your browser, so sensitive payloads from APIs, environment files, or internal services never leave your device. No sign-up, no rate limits, and no paywall.
How to use
- 1 Paste or type your JSON into the input panel on the left — error indicators appear immediately as you type.
- 2 Select a mode from the toolbar: Lint to see a list of errors, Format to re-indent cleanly, Pretty Print for a readable tree view, or Validate to confirm the document is spec-compliant.
- 3 Toggle Sort Keys in the options bar if you want object keys sorted alphabetically throughout the output.
- 4 Upload a JSON file by clicking the Upload button or dragging a .json file onto the editor.
- 5 Click the Share button to generate a shareable URL that encodes the current JSON, so you can send it to a colleague.
- 6 Use the Copy button to copy the formatted output to your clipboard, then paste it directly into your editor or API client.
- How is this different from other JSON formatters like jsonformatter.curiousconcept.com?
- Most formatters offer only pretty-printing. This tool combines four modes — Lint, Format, Pretty Print, and Validate — in a single interface. The Sort Keys option, shareable URL, and file upload are additional features not found together in most free tools. Everything runs client-side, which matters when your JSON contains API keys, PII, or internal service data.
- What JSON errors does the linter catch?
- The linter catches all JSON specification violations: trailing commas after the last element in an array or object, unquoted or single-quoted keys, missing commas between values, mismatched or unclosed brackets and braces, and invalid literal values (e.g. undefined or NaN, which are not valid JSON). Each error is reported with the exact line and column number.
- What does Sort Keys do?
- Sort Keys alphabetically sorts all object key names at every level of nesting in the JSON document. This is useful when comparing two JSON objects with a diff tool, because it ensures keys appear in a consistent order regardless of how the original data was produced.
- Is my JSON data sent to a server?
- No. All four modes — Lint, Format, Pretty Print, and Validate — run entirely in your browser using JavaScript. Your JSON data is never sent to any server, which makes it safe to paste API responses, authentication tokens, database exports, or any other sensitive payload.
- Can I use this tool offline?
- Yes. Once the page has loaded, the formatter works without an internet connection. This makes it reliable for air-gapped environments or when working on a flight.