Skip to content
ConvertPassConvertPass home

Developer

JSON formatter

Pretty-print JSON locally with clear parse errors and a one-click copy.

This tool processes files and text locally in your browser. Your content is not uploaded or stored by this site.

0 B
Empty

Empty. Paste text, drop a file, or load the example.

What this tool does

This formatter parses JSON using the standard ECMA-404 grammar, then reprints it with two-space indentation. It does not reorder keys, evaluate JavaScript, or keep comments, because standard JSON has no comment syntax.

How to use it

  1. Paste JSON, drop a .json file, or load the example.
  2. Read any parse error. The message includes an approximate line and column.
  3. Copy the formatted output or download it as formatted.json.
  4. Reset the workspace to clear both panes. Nothing is stored.

Supported input

  • JSON text or a .json file, UTF-8, up to 2 MB

Output

  • Pretty-printed JSON with a trailing newline

Privacy

This tool processes files and text locally in your browser. Your content is not uploaded or stored by this site.

ConvertPass does not include your input in analytics, URLs, or error reports. Encoding: UTF-8. A leading BOM is stripped before parsing.. Limit: 2 MB (2.00 MB).

Limitations

  • Comments, trailing commas, and single quotes are invalid JSON. Use the JSON repair helper if you need a best-effort reconstruction.
  • Key order is preserved by the parser, but semantically JSON objects are unordered.
  • Very large documents may still freeze a low-memory phone even under the 2 MB cap.

Example

Input
{"tool":"ConvertPass","local":true,"formats":["json","yaml"]}
Output
{
  "tool": "ConvertPass",
  "local": true,
  "formats": [
    "json",
    "yaml"
  ]
}

Troubleshooting

Unexpected token at a position
Check the reported line for a missing comma, an extra comma, or an unquoted key. JSON requires double quotes around every key and string.
The output looks unchanged
The input may already be formatted. Minify it first if you want to confirm the parser is rewriting the document.

FAQ

Does formatting JSON change the data?

No. Whitespace outside strings is insignificant. The formatter parses the value and serialises the same value. String contents, numbers, and boolean values are not rewritten except for standard JSON number normalisation.

Why did my comments disappear?

JSON does not support comments. If you need to keep comments, you likely want JSONC, which this formatter does not treat as valid. The repair helper can strip comments, but that is a reconstruction, not formatting.

Is the file uploaded?

No. Parsing runs in your browser. ConvertPass does not send the document to a server, and the formatted text is not added to the URL or to analytics.

What indent does it use?

Two spaces, which is the common default in JavaScript tooling. Tabs are not inserted. If you need a different width, minify and re-indent in your editor after download.

Can it format JSON Lines?

Not as a stream. JSON Lines is one JSON value per line. Paste a single value, or wrap lines into an array first. A dedicated JSONL tool is not included in this release.

Related tools

  • JSON minifier

    Collapse JSON to a single compact line without sending it anywhere.

  • JSON validator

    Check whether text is valid JSON, with a useful error location.

  • JSON repair helper

    Rebuild almost-JSON into strict JSON, then read the warning before you trust it.

  • JSON to YAML

    Turn JSON into readable YAML without leaving your machine.

Related guides

Related formats

Last reviewed 16 August 2026. Report a problem. Reports do not include your input.