JSON Formatter
Validate, format, minify and explore JSON in a searchable tree. Keep every number precise.
Format and explore nested data.
Local processing · UTF-8 files · input up to 1 MiB · nesting up to 128 levels. Nothing you enter is uploaded.
Result
Your result will appear here after processing.
How do I format JSON?
Paste JSON or choose a UTF-8 JSON file. Format JSON validates the input and indents it with two spaces. Minify JSON removes whitespace outside strings. Copy or download the result.
Will large numbers change?
Number tokens are preserved exactly, including integers beyond JavaScript’s safe integer range, exponents and decimal notation. The formatter does not parse and reserialize numbers.
Input
{"id":9007199254740993,"amount":1.2300,"zero":-0}Output
{
"id": 9007199254740993,
"amount": 1.2300,
"zero": -0
}How do I minify JSON?
Choose Minify JSON to remove indentation and line breaks without changing values or whitespace inside strings.
Input
{
"active": true,
"tags": ["api", "json"]
}Output
{"active":true,"tags":["api","json"]}Can I explore JSON as a tree?
After formatting or minifying, expand objects and arrays in Tree view, or search keys and values. Each branch shows 50 items per page and search shows the first 100 matches. Values retain their original number notation. Use Copy path to locate a node with bracket notation, or Copy value to take a complete JSON value or subtree. Object keys with dots, quotes or spaces are escaped in paths.
What counts as invalid JSON?
Comments, trailing commas and incomplete input are rejected. Duplicate object keys are also rejected to avoid ambiguous values. Errors include a line and column. Top-level strings, numbers, booleans and null are valid JSON.
What can I do next?
Copy your result before opening another tool, then paste it there.
- Convert JSON to CSV for a spreadsheet.
- Convert CSV to JSON before formatting.
- Compare two texts to review changes line by line. This compares text, not JSON structure.
What are the limits?
Input is limited to 1 MiB, nesting to 128 levels and output to 4 MiB. JSON is processed locally and is cleared when you leave or reload this tool.