How to use it
- 1Paste your JSON into the input editor, open a .json file, or load the example.
- 2Choose Beautify or Minify, then pick 2 spaces, 4 spaces or tabs for indentation.
- 3Fix any reported error using the line and column shown below the editors.
- 4Copy the formatted result or download it as a .json file.
What is a JSON formatter?
A JSON formatter rewrites a JSON document with consistent indentation and line breaks so that its structure becomes easy to read. Minified JSON omits line breaks between tokens. Beautified JSON places each property on its own line and indents nested objects and arrays.
Formatting preserves decoded string values but may rewrite their JSON escapes. For example, the Unicode escape \u0061 becomes the letter a and the optional escape \/ becomes a slash. Escapes required for valid JSON remain escaped. The output text can differ even when the JSON values are equivalent.
Beautify or minify?
Beautify when you need to read, review or debug a payload, write documentation, or commit configuration files that humans will edit. Choose two spaces for compact indentation, or use four spaces or tabs to match your project’s style.
Minify when size matters: storing JSON in a database column, embedding it in a request, or shipping it to a browser. Minify removes formatting spaces and line breaks between tokens. The size also depends on how strings are serialized, and already compact input may be unchanged.
Exact numbers, order and duplicate keys
DataVelix keeps the original text of each number. Large integers such as 9007199254740993, exponent notation, and trailing decimal zeros such as 19.90 are reproduced exactly.
The formatter keeps object entries in their original order, including repeated keys, and keeps array order. It warns about duplicate keys within the diagnostic limits. Other systems may interpret repeated keys differently.
Frequently asked questions
Is my JSON uploaded when I format it?
No. The formatter processes the JSON you paste or open in your browser.
Why does the formatter report an error?
Syntax errors include a line, column and suggested fix. DataVelix also stops when an input exceeds a processing limit, such as document depth or output size.
Will formatting change my numbers?
No. Numbers are copied exactly as written. Large integers, exponents and decimal zeros are preserved.
What is the maximum file size?
Imports accept up to 10 MiB per file. Pasted input is limited to 15,000,000 characters. Formatting also checks complexity, including 500 nesting levels, 300,000 JSON values and 24,000,000 output characters. Copy and download include the full result when the editor shows a limited preview.