Trim by Munetris

Check JSON the way an integration sees it

Paste a payload. Trim explains any syntax error in plain words and can repair the usual non-JSON. It also flags what most validators let through: numbers such as account IDs that change when a system reads them, and keys that appear twice. Then browse it as a tree, copy any value's path, and validate it against a JSON Schema.

Runs entirely in your browser. Nothing you paste is uploaded or stored, and the page's security policy blocks every network request.

Example

Check

    Output

    Numbers are copied exactly as written, so 12345678901234567890 and 1250.00 stay as they are.

    Tree

    Click any value to get its JSONPath and JSON Pointer.

      Drafts 4, 7, 2019-09 and 2020-12, chosen from the schema's $schema. Each error links to the value it is about.

      Questions

      Why does Trim warn about a number that is perfectly valid JSON?

      JSON allows numbers of any size, but JavaScript and many JSON libraries store them as 64-bit doubles, which hold about 15 to 17 significant digits. An account ID such as 12345678901234567890 silently becomes 12345678901234567168 the moment such a system reads it. Send identifiers as strings, and keep amounts as strings or within 15 significant digits.

      Why warn about duplicate keys?

      The JSON standard says keys should be unique but does not forbid duplicates, so most parsers accept them and silently keep only the last value. If a mapping or a person added a second "currency", the first one disappears without an error. Trim shows both and where they are.

      What does Repair change?

      It turns near-JSON into JSON: it removes comments and trailing commas, changes single and curly quotes to straight double quotes, quotes unquoted property names, and replaces NaN, Infinity and undefined with null and Python's True, False and None with their JSON forms. It lists every change before you apply it.

      Who makes this?

      Trim is built by Myggiz Software B.V. in the Netherlands, by an integration consultant with 30 years of B2B integration work. It is one of the free Munetris tools for teams running B2B gateways and integrations.