What this tool does
A JSON formatter that pretty-prints, minifies, validates, repairs, and queries JSON in your browser. It points to the exact line and column of any syntax error, supports drag-and-drop for files, remembers your last input across page reloads, and renders multi-megabyte documents without freezing the tab. Everything runs locally — no server round trip, no upload.
Beyond formatting, the tool offers JSONPath queries for picking values out of a document, an interactive tree view with inline editing, sort-keys for stable diffs, a "Repair" pass for the JSON-with-trailing-commas-and-comments your config file actually contains, CSV export for arrays of objects, and a permalink that encodes your input into the URL so you can share an exact view with a teammate.
When you'd use it
- Reading the body of an API response that came back as one minified line.
- Cleaning up a config file before committing it to a repo.
- Confirming that a payload you're about to POST is actually valid JSON.
- Pulling a single value out of a deeply-nested document with a JSONPath expression like
$.users[?(@.role=='admin')].email. - Exporting an array of records as CSV for a spreadsheet.
- Sharing a problematic payload with a teammate via a permalink, without pasting the JSON into Slack.
- Diffing two JSON documents (sort keys on both, then run the Diff Checker on the formatted output).
How it works
The strict parser is the browser's built-in JSON.parse, which means RFC 8259 conformance: no trailing commas, no comments, no unquoted keys, no single-quoted strings. When parsing fails, we map the position from the native error message back to a line and column so you don't have to count braces by hand. Pretty-printing uses JSON.stringify(value, null, 2) and minifying uses JSON.stringify(value) — the same primitives your runtime uses.
The Repair pass is intentionally separate: it strips line and block comments, removes trailing commas, and normalises smart quotes to straight quotes, then runs the strict parser on the result. It does not try to guess at unquoted keys or invent missing brackets — if a document is structurally broken, you should know.
Sort keys walks the tree recursively and re-emits each object with its keys in lexicographic order. Arrays keep their existing order. This is the trick for getting a stable diff between two API responses that disagree only on key order.
JSONPath queries are evaluated against the parsed document. The matched values are highlighted in the tree view and listed in the results panel. Filter expressions (?()), wildcards (*), recursive descent (..), and array slices ([start:end]) are all supported.
Tree editing lets you click a value to change it in place. Edits are applied to the parsed structure and re-serialised back into the textarea, so the formatted output and the tree never disagree. Expanded/collapsed state is preserved across re-renders so you don't lose your place when you save an edit.
CSV export flattens an array of objects into a header row plus value rows. Nested fields are accessible via dot-paths. Strings containing commas, quotes, or newlines are escaped per RFC 4180.
Permalinks encode the input into the URL fragment with Base64 + LZ-style compression, so the JSON itself never touches a server. The fragment fits comfortably in the address bar for typical payloads (a few KB); huge documents stay local and the permalink option dims out.
Notes
Why does a copy of an API response fail to parse? Browsers and terminals sometimes paste smart quotes (" and ") instead of straight quotes ("). JSON requires straight quotes. The strict parser will land the error indicator on the first smart quote, or the Repair pass will normalise them for you.
Are big files supported? Yes. The parser handles multi-megabyte documents and the tree view virtualises rendering so even a 50 MB array stays scrollable. Above that, the browser's main thread can briefly freeze on the parse step itself; at that scale prefer a streaming parser like stream-json in Node.
Why is the JSONPath result empty? JSONPath expressions are case-sensitive and must start with $ for the root. Filter expressions need a leading @ for the current node — $.users[?(@.role=='admin')] not $.users[?(role=='admin')].
Does the permalink expose my data? No. The encoded payload sits in the URL fragment (the part after #), which browsers do not send to servers. If you share the permalink, the recipient's browser decodes it locally; TaskKit never sees it.
Does this tool see my data? No. Parsing, formatting, JSONPath evaluation, repair, and CSV export all happen in your tab. There is no upload step, no analytics on the contents, and no preview that ships text to a server.
Related tools
- JSON ↔ YAML — convert between formats
- JSON Schema Validator — validate structure against a schema
- Diff Checker — compare two JSON documents
- How TaskKit compares to jsonformatter.org — feature matrix, network calls measured, what each tool uploads