JSON Formatter, Validator & Converter — QRif JSON Tools

QRif JSON Tools — free JSON formatter, validator, beautifier, tree editor, JSONPath query, repair tool and converter to XML, CSV, YAML and TSV. Runs 100% in your browser.

The interactive workspace loads in a moment. Everything below is also available as written documentation.

What you can do

  • Format and beautify JSON with 2, 3, 4 or 8 space indentation.
  • Validate against RFC 8259 with exact line and column errors.
  • Repair malformed JSON: trailing commas, comments, single quotes, unquoted keys, Python literals and missing brackets.
  • Query with JSONPath, including filters such as $.users[?(@.age > 21)].
  • Compare two documents structurally and export an RFC 6902 JSON Patch.
  • Generate TypeScript, Zod, Python, Go, Rust, Java, C#, Kotlin, Swift, SQL and GraphQL from JSON.
  • Validate a document against a JSON Schema.
  • Convert JSON to and from CSV, TSV, YAML, XML and JSON Lines.
  • Build an HTTP request and export it as cURL, fetch, Python, Go or PowerShell.

Guides

Frequently asked questions

Is this JSON formatter free to use?

JSON Tools is free and runs entirely in your browser. There is no account requirement, no upload, and no limit on document size beyond what your machine can hold in memory.

Is my JSON data uploaded to a server?

No. Parsing, validation, formatting, repair, querying, diffing and conversion all execute in local browser memory. You can confirm this by watching the browser network panel — no document data is transmitted.

What is the largest JSON file I can paste in?

Practically, several megabytes. Above roughly 200 KB the analysis runs in a Web Worker so typing stays responsive, and the editor virtualises rendering. For datasets larger than a few megabytes, use JSON Lines and process line by line.

How do I fix "Unexpected token } in JSON at position N"?

That message almost always means a trailing comma before a closing brace. Remove the comma after the last property (or array element), then validate again. The validator points at the exact line and column, and Auto-repair removes trailing commas automatically.

Does the tool support comments in JSON?

Strict RFC 8259 JSON has no comments. Auto-repair strips // and /* */ comments so a JSONC or JSON5 file can be normalised. If you need to keep comments, use a JSONC-aware formatter instead.

Can I convert YAML, XML, CSV or NDJSON to JSON?

Yes. CSV, TSV, JSON Lines and header maps convert to JSON in the Convert panel, and JSON exports to XML, CSV, TSV, YAML and JSON Lines. YAML is currently export-only; import it as JSON if your YAML is simple.

What is the difference between formatting and minifying?

Formatting adds indentation and line breaks for humans. Minifying removes all insignificant whitespace for transport. Either way the data is identical — only whitespace changes.

Can I query JSON with JSONPath here?

Yes. The Query panel supports $.key, ["key"], [0], [-1], [*], [1:3], recursive descent ..key and filters such as [?(@.price > 10)] or [?(@.name =~ /ann/i)]. Results can be promoted into the editor or deleted from the source.

How do I compare two JSON documents?

Paste one in each pane and open Compare. You get a line-by-line diff and a structural diff keyed by JSON path, which can be exported as an RFC 6902 JSON Patch.

Why did my large integer change value?

JSON numbers are IEEE-754 doubles in JavaScript, so integers above 9,007,199,254,740,991 lose precision. Store identifiers as strings; the analyser flags unsafe integers with their exact path.

Does it work offline?

Yes. Once loaded, every feature that does not fetch an external resource works with no network connection. You can also build it locally and host it anywhere as static files.

Is there a keyboard-driven workflow?

Format, minify, validate, repair, sort, compare, find, save, new document and the command palette all have shortcuts. Press the help shortcut to list them; the palette searches every command by name.

JSON glossary

JSON
JavaScript Object Notation: a text format for structured data defined by RFC 8259 / ECMA-404.
RFC 8259
The IETF specification that defines the JSON grammar and encoding rules.
Beautify
Reformatting JSON with indentation and line breaks for readability.
Minify
Removing insignificant whitespace so the document occupies the fewest bytes.
JSONPath
A query language for JSON, analogous to XPath for XML.
JSON Schema
A declarative vocabulary for describing and validating the structure of JSON documents.
NDJSON
Newline-delimited JSON: one independent JSON value per line, used for streams and logs.
Prototype pollution
A JavaScript vulnerability where attacker-controlled keys modify Object.prototype.
JSON Patch
RFC 6902, a format describing a sequence of operations to apply to a JSON document.
Idempotent normalisation
Formatting that always produces the same bytes for semantically identical input, so diffs stay stable.