Numbers stay as they were written
The JSON is never turned into a JavaScript object and written out again. 900719925474099312345, 1.2300e+5 and -0 come out of formatting or minifying as they went in.
JSON · Runs in your browser
Paste JSON or choose a UTF-8 file, check its syntax, then indent it or take out the whitespace between values, and copy or download the result. Numbers stay as they were written, large integers included; so do the order of the keys and the spaces inside strings. Duplicate keys are reported and kept.
Standard JSON only: comments, single quotes and trailing commas are not repaired. A file has to be UTF-8; a BOM at its start is removed when formatting or minifying.
The JSON is never turned into a JavaScript object and written out again. 900719925474099312345, 1.2300e+5 and -0 come out of formatting or minifying as they went in.
Minifying takes out the spaces, line breaks and tabs outside strings. Two spaces inside a string, an escape or a URL stay as they are. Keys are not sorted and duplicate keys are not merged.
When the source or the indent changes, the old result is dropped. What you download is this result; your file is not overwritten. The page keeps nothing: reload it and the text is gone.
Go to the line and column in the message and check the double quotes, commas, colons and brackets. Standard JSON has no comments, single quotes, undefined or NaN, and a trailing comma is an error too. The source is never changed for you.
No. A number is kept as it was written and never becomes a JavaScript Number. The program that reads the JSON next may still read it as floating point; whether an identifier should be a quoted string is for whoever produces the data to decide.
No. Only the whitespace between values goes. Spaces, escaped line breaks and double slashes inside a string stay as they are.
The JSON grammar allows a name to appear twice, but programs do not agree on what that means. This tool says how many there are and keeps their order and values; correct them by your own rules.
More than tools
Doc2X translates a PDF and keeps its layout, converts it to Markdown, LaTeX, Word or Typst with the formulas and tables intact, and answers questions about it with the page each answer comes from. The free plan covers about 100 pages a month.