MASK

Free with a MASK account

JSON Formatter & Validator

Format messy JSON, or find out exactly where it breaks.

Runs entirely in your browser — what you enter is never sent to MASK. Your account records that you used this tool, along with how long your input was and the size of the file — never what you entered.

Paste or type JSON. Up to 1,000,000 characters.

Used when formatting. Minify ignores it.

Questions

Is my JSON uploaded anywhere?
No. The parsing and formatting happen in this page, in your browser, and nothing you paste is sent to MASK — there is no field in anything this page sends that could carry a line of it. It does talk to MASK for two things, neither of which is your document: to check whether you are signed in, and to record on your account that you used this formatter, how long the input was and how many bytes came out. Those are sizes, never the document. That is also why it needs a connection: offline, the sign-in check cannot complete, so nothing is formatted.
Does formatting change my data?
Keys keep their order and values keep their meaning, but the result is not byte-for-byte identical to what you pasted. JavaScript normalises numbers when it reads them, so 1.0 comes back as 1, 1e3 as 1000, and whole numbers beyond about 9 quadrillion lose their last digits. Duplicate keys collapse to the last one, and whole-number keys like "2" move ahead of text keys. If you need the original bytes exactly, keep the original file.
What does the line and column in the error mean?
It is where the parser gave up, which is usually just after the real mistake — a missing comma, an extra comma before a closing bracket, or a quote or bracket left open on an earlier line. Some browsers do not report a position for every error; when that happens the tool says so rather than guessing at one.
Does it accept comments or trailing commas?
No. This validates strict JSON, so a trailing comma, a comment, a single-quoted string or an unquoted key is reported as an error rather than quietly accepted. That is deliberate: if it parsed here but failed in your code, the tool would have lied to you.
Why is there a size limit?
Formatting runs on the same thread as the page, so a very large paste would freeze the tab with no way to cancel it. The limit is 1,000,000 characters, roughly a megabyte of text.