MrTools

MrTools guides

How to format and validate JSON

Formatting makes JSON readable; validation confirms that the data follows JSON syntax.

Start with data, not JavaScript

Valid JSON uses double-quoted keys and strings and does not allow comments, functions or trailing commas. MrTools parses input as data with JSON.parse and never evaluates pasted text as code.

Choose useful indentation

Two spaces keep API payloads compact; four can be easier to scan in documentation. Indentation changes presentation, not values. Review errors near missing quotes, commas, braces or brackets.

Respect privacy and limits

The formatter accepts up to 2 MB of UTF-8 text and works locally. Do not paste secrets into untrusted tools; Base64 is reversible encoding and is not a substitute for encryption or access control.

02 · Answers

Frequently asked questions

Does formatting change JSON values?+

No. Successful formatting changes whitespace and indentation while preserving parsed values.

Can the formatter run JavaScript?+

No. It only parses JSON data with JSON.parse.