Skip to content
EVOA Toolbox

JSON Formatter

Format, beautify and sort JSON with syntax highlighting. Pinpoints errors by line and column. Runs locally in your browser.

Processed locally in your browser. Your text is not uploaded.

Loading tool…

What this tool does

Paste minified or messy JSON and get a clean, indented, colour-highlighted version in one step. Choose two spaces, four spaces or tabs, and optionally sort every object's keys alphabetically so two payloads can be compared line by line or committed to version control with stable diffs.

If the text is not valid JSON, the tool tells you what is wrong and exactly where: line, column and a caret under the offending character. Typical culprits such as trailing commas, single-quoted strings, unquoted keys, missing commas and unterminated strings each get their own plain-language explanation.

Formatting happens entirely in your browser; the JSON you paste is never uploaded. Number literals are kept exactly as you wrote them, so a 20-digit ID or a value like 1.0 is not silently rounded or rewritten, and a notice appears when an integer is too large for JavaScript to represent safely.

How to use it

  1. 1Paste your JSON into the input box, drop in a .json file with Upload, or click “Insert example”.
  2. 2Pick the indentation (2 spaces, 4 spaces or tab) and turn on key sorting if you want a canonical order.
  3. 3Read the highlighted result below. If there is an error, follow the line and column shown under the input.
  4. 4Copy the result or download it as a .json file.

Supported formats

Standard JSON (RFC 8259) as plain text or a .json file. Comments, trailing commas, single quotes and other JSON5 extensions are not valid JSON and are reported as errors.

Privacy

This tool runs in your browser. The data you provide is processed on your device and is not sent to our servers.

Limitations

  • Inputs over 5 MB are not processed automatically; you can still choose to process them, but the page may become slow depending on your device.
  • Syntax highlighting is skipped for very large outputs, and only the first 400,000 characters are shown on screen. Copy and download always include the full result.
  • Sorting keys parses and reorders every object, so it is slower than plain formatting on large documents. Duplicate keys are kept when not sorting.
  • Integers beyond ±9,007,199,254,740,991 are preserved in the output text, but any JavaScript code that later calls JSON.parse on them will round them.

FAQ

Is my JSON sent to a server?

No. Parsing, formatting and highlighting all run in your browser tab. Nothing you paste is uploaded, so it is fine for API responses and config files, though you should still avoid pasting secrets on shared computers.

Why does it say my JSON is invalid when it works in my editor?

Editors and many parsers accept relaxed syntax such as comments, trailing commas, single quotes or unquoted keys (JSON5 or JavaScript object literals). Strict JSON, which is what APIs and JSON.parse expect, allows none of these. The error message names the exact problem and location.

Does formatting change my data?

No. Only whitespace is changed (and key order if you enable sorting). Strings, numbers and values stay exactly as written, including very large integers.

What does sorting keys do to arrays?

Nothing. Array order is meaningful and is never changed. Only the keys inside objects are sorted, at every level, by their Unicode code points.

Related tools