Read an API response
Expand compact JSON before tracing fields or sharing a readable example.
A little more possibility
Format, validate and explore JSON. Keep every number precise, find errors quickly, and download clean JSON.

or drop your JSON file here |
Paste JSON or try the sample.
Expand a branch to inspect values. Select a path to copy it.
Use your result in another text tool.
JSON Formatter turns compact JSON into readable indented code, validates syntax, and creates a minified version when you need fewer spaces. Paste JSON or import a UTF-8 JSON or text file, then inspect the code or explore its nested values.
Expand compact JSON before tracing fields or sharing a readable example.
Explore objects and arrays, then copy a path to the value being discussed.
Find syntax errors before passing JSON to another system.
Upload a JSON or TXT file, drag it onto the entry area, or choose Write or paste JSON.
Imports must contain UTF-8 text and fit the 1 MB input limit. The tool accepts any valid JSON value, including an object, array, string, number, boolean or null. It does not accept JavaScript expressions, comments, single-quoted keys or trailing commas. Sample fills a working example; Clear removes the current input. Formatting does not require an account or a conversion upload.
Validate only checks the input while keeping you in the editor.
A successful check reports the number of values and any duplicate keys. A syntax error reports a line and column and selects the location in the input when available. Format JSON and Minify JSON also validate before creating a result. The tool identifies errors but does not guess repairs. Correct the source, then validate again; a plausible-looking edit still needs to match the structure your receiving system expects.
Use 2 spaces, 4 spaces or Tabs for indentation, or remove layout whitespace with Minify JSON.
The default indentation is 2 spaces. Format JSON adds line breaks and indentation around structured values. Minify JSON removes those layout spaces and line breaks while preserving the contents of strings. The original number spellings are retained, including large integers and exponent notation. Formatting improves presentation; it does not convert a string into a number, change array order or evaluate code.
Sort object keys makes object properties easier to scan without rearranging arrays.
The sorting checkbox starts off. When enabled, keys are sorted in every object using character order. Arrays keep their original item order. Duplicate object keys are retained rather than silently overwritten, and a warning is displayed. Some consumers interpret duplicate keys differently, so resolve duplicates in the source when the destination requires unambiguous field names.
Switch from Code to Tree to expand objects and arrays.
The Tree view shows property names, types and values. Copy path copies a bracket-style path such as $["tags"][0]; it copies the location, not the value. Collapse all folds the branches. To keep the page responsive, the tree preview is limited to 1,500 values. Code and the downloaded JSON still contain the complete formatted output within the supported limits.
Copy JSON or download formatted.json from the result page.
The download and copy controls use the currently generated result. Use Back to editor for source or setting changes, then format or minify again. The filename remains formatted.json for either output style. Continue to lists compatible follow-up tools based on the result. A receiver may parse numbers differently, so preserving a long integer here does not guarantee that every other application will preserve it.
Input: 1 MB. Parsing supports up to 100,000 values and 96 nested levels. Formatting stops if output exceeds 4,194,304 characters. Tree preview displays up to 1,500 values; this preview limit does not truncate the download.
Validation, formatting and tree inspection happen in your browser. Source JSON is not sent to a formatting service. Save the result before closing or refreshing the page.
See the Privacy Policy for file and data handling.
This formatter preserves number spellings rather than converting them into ordinary JavaScript numbers. For example, 9007199254740993 stays unchanged. A different application that receives the JSON may still use a number type that rounds it.
No. Validation here checks JSON syntax. It does not check a particular API schema, required fields or business rules.
All duplicate entries are retained and a warning is shown. Because receiving systems may interpret duplicates differently, review and resolve them when appropriate.
No. Sort object keys sorts properties within objects, including nested objects. Array item order is preserved.
The tree preview is limited to 1,500 values for responsiveness. The Code view and download retain the complete formatted output within the supported limits.
QUICK VIDEO TUTORIAL
How to Format JSON and Download the Result
Format JSON with two-space indentation, explore the tree view, and download a verified JSON file.
English narration
Watch the video