Formatting checks syntax, not intent
JSON Formatter parses JSON before formatting or minifying it. XML Formatter checks well-formed XML, not validity against an XSD or another schema, and rejects DOCTYPE and entity declarations so external entities cannot request files or network resources. A visually tidy document can still contain the wrong values for an application.