JSON Formatter & Validator
Pretty-prints, minifies and validates JSON, pointing at the exact line and column of a syntax error.
Paste JSON and it is parsed, checked and re-printed — indented, minified, or as one object per line for streaming tools. When it does not parse you get the line and column with the offending character marked, and a repair pass that names each thing it would change rather than silently rewriting your document.
Indented, one value per line.
Input
Drop a .json file
Read in this tab. Nothing is uploaded.
Output
Waiting for input.
How to use it
Paste or drop the document
The text box takes a paste; the drop zone under it takes a .json or .jsonl file. Either way the file is read in this tab and nothing is uploaded.
Choose what the output should be
Format for reading and diffing, Minify for shipping over the wire, JSON Lines when the consumer wants one array element per line. Indent width only applies to Format.
Turn on key sorting when you are diffing
Two exports of the same data often differ only in key order. Sorting deeply, in code-unit order, makes them byte-identical so the diff shows the real change.
Read the fault, or apply the repair
A syntax error is shown with the surrounding lines and a caret under the character. If the mistakes are ones the repair pass recognises — a trailing comma, a single quote, an unquoted key — it lists them and can apply them into the input box so you can see the diff before you copy.
Common questions
Why did a large number come out different?
This parses with the browser's own JSON parser, so every number becomes a double. An id like 9007199254740993 loses its last digit and there is no way to get it back from the parsed value. If your document carries 64-bit ids, keep them as strings.
Does the repair guarantee valid JSON?
No, and it says so. It fixes the mistakes it recognises; if the result still does not parse the panel tells you that instead of offering to apply it. It is a shortcut for the common typos, not a lenient parser.
How big a file can it take?
A few megabytes is comfortable. The parse is native and runs on the main thread after a short pause in typing, so a 5 MB document costs one dropped frame; past roughly 20 MB the browser tab, not the tool, becomes the limit.
Are comments allowed?
Not in JSON, so a document with // or /* */ fails to parse. The repair pass strips them, which is the usual way to get a JSONC config through here.
Feed it from
List Formatter
Turns lines into a comma list, quoted SQL IN clause, JSON array or bullet list, and back again.
YAML Formatter & Validator
Re-indents YAML consistently, validates it, and flags the tab and anchor mistakes that break parsers.
TOML Formatter & Validator
Formats and validates TOML, normalising table ordering and inline-table style.
XML Formatter & Validator
Indents XML and reports the line and column of the first well-formedness fault.
Next
These accept what this tool produces, so the result can go straight in.
JSON Diff
Compares two JSON documents structurally, ignoring key order and reporting added, removed and changed paths.
JSONPath Tester
Runs a JSONPath expression against a document and highlights the matched nodes as you type.
JSON to TypeScript
Infers TypeScript interfaces or types from a JSON sample, merging optional and union fields.
JSON ⇄ YAML
Converts either way, preserving key order and choosing block or flow style for the YAML side.
Base64 Encoder & Decoder
Encodes and decodes Base64 and Base64URL for text or files, handling UTF-8 correctly.
curl to Code
Converts a curl command into fetch, axios, Python requests, Go, PHP or PowerShell.