Small tasks. A little easier.126 tools · No account required

Find your next tool

Search all 126 tools and their practical guides.

Developer notes

A five-minute JSON check before you ship

Find syntax mistakes, preserve data types, and understand what validation tells you.

ERITHRA editorial3 min read

JSON formatting is a small step that can make a large payload easier to inspect. Formatting and validation answer different questions, though. Valid JSON can still contain the wrong data for your application.

Start with syntax

JSON requires double-quoted property names and strings. It does not allow comments, trailing commas, undefined values, or JavaScript functions. The JSON formatter parses the text first, so syntax errors stop the operation instead of producing an apparently successful result.

{
  "name": "Example",
  "enabled": true,
  "tags": ["documentation", "tools"]
}

Indentation and whitespace outside strings do not change the data. Whitespace inside a string does. A formatter should preserve string contents while making the surrounding structure easier to read.

Check types deliberately

The number 42 and the string "42" are different values. So are null, an empty string, and an absent property. Compare the parsed data with the contract expected by the receiving application.

JavaScript numbers have finite integer precision. Very large numeric identifiers may be changed when parsed and serialized. Treat identifiers as strings when you control the data format, and use a specialized parser when exact large numeric literals must be preserved. ERITHRA’s formatter uses the browser’s standard JSON parser and does not promise arbitrary precision.

Validate the structure separately

Syntax validation only tells you that a JSON document can be parsed. It does not prove that a required field exists, that a date has the right format, or that an email address belongs to anyone.

For application data, validate against a documented schema on the server as well as in the interface. JSON Schema’s documentation explains how to describe constraints such as required properties and allowed value types.

Be careful with CSV conversions

CSV has no universal type system. A value that looks like a date or a number may be an identifier with leading zeros. ERITHRA’s CSV to JSON converter keeps fields as strings to avoid silently changing those values.

The JSON to CSV converter accepts flat objects. Nested arrays and objects should be flattened deliberately before export. Spreadsheet applications may interpret certain CSV values as formulas; ERITHRA prefixes formula-like strings on export to reduce that risk. Review exported data before using it in another system.

Keep credentials out of shared examples

Use synthetic payloads for bug reports and documentation. A JWT can be decoded without a secret, but the payload may still contain personal data. Decoding a JWT does not verify its signature, issuer, audience, or authorization. Make those trust decisions with a suitable verification library in the application that consumes the token.

jsondevelopmentvalidation

Put it into practice

Keep reading