Filery

JSON Formatter

Format, validate and query JSON, or convert it to YAML, CSV or TOML.

Choose file or drop it anywhere on this page Processed on your device — never uploaded

How to json formatter

  1. Paste JSON into the editor, or upload a .json file.
  2. Choose an action — format, minify, validate, sort keys or run a JSONPath query.
  3. Copy the result or download the file.

About this tool

JSON formatting is the simplest operation here and the most frequently needed. Minified API responses — a single line of text with no whitespace — are impossible to read. Paste them in, click format, and the tree structure becomes visible. The validator shows exactly where a syntax error is, which saves hunting through a thousand characters for a missing comma.

The format conversions are more opinionated. JSON to YAML is straightforward — YAML is a superset of JSON, so every valid JSON document is also valid YAML, and the conversion is lossless. JSON to CSV requires the input to be an array of flat objects. JSON to TOML requires flat key-value structure. These constraints are inherent in the target formats, not limitations of this tool.

Questions

What JSONPath syntax is supported?
The implementation follows the RFC 9535 standard, which formalises the Goessner syntax that most tools use. You can use $ for the root, . for child, .. for recursive descent, [*] for all array elements, [0] for index access, [?(@.price < 10)] for filter expressions, and the standard arithmetic and comparison operators.
Can JSON always be converted to CSV?
Only when the JSON is an array of flat objects with consistent keys — which describes most API responses and database exports. Nested objects and arrays cannot be flattened to a two-dimensional table without information loss. The converter will warn you if the structure is too nested to convert cleanly.
What does "sort keys" do, and why is it useful?
It recursively sorts every object's keys alphabetically throughout the document. This makes two JSON responses from the same API directly comparable in a text diff, where key-order variation would otherwise produce false changes.