DATA WORKFLOW

Make JSON readable before you share it.

Validate structure, remove private values, and check the meaning of your data before copying it.

Readable JSON makes a bug report or API example easier to understand, but formatting is not the same as validation against a schema or removal of secrets. A pretty-printed document can still contain the wrong types, an access token or a customer’s details. Work through those checks separately before sharing the result.

Before you start

  • Use a sample with dummy values whenever possible.
  • Keep a copy of the original so changes can be compared.
  • Identify the keys and value types expected by the receiving system.

STEP 01

Remove private values before pasting

Look for tokens, passwords, email addresses, customer identifiers and private URLs. Replace them with clearly labelled sample values before moving data between tools. Redaction should preserve the type expected by the example: a sample number remains a number, and a sample object remains an object.

Avoid sharing a live credential even in a screenshot. Browser-side processing limits document uploads, but it cannot protect against browser extensions, a shared clipboard or somebody with access to your device.

STEP 02

Validate the syntax

Paste the sample into the JSON formatter. JSON requires double-quoted property names and string values. Trailing commas and comments belong to some other formats, not standard JSON. If parsing fails, inspect the reported location and the preceding line.

Start by fixing one syntax problem at a time. A comma error near the beginning can make a later line look wrong. Do not solve an error by changing a numeric value into a string unless the consuming system actually expects a string.

Open JSON formatter ↗

STEP 03

Check types and values after formatting

Indentation exposes the hierarchy so you can inspect which fields belong inside an object or array. Check the difference between null, an empty string, an empty array and a missing key: those often represent different states to an application.

This browser tool uses JavaScript number handling. Integers beyond the safe range may lose precision when parsed and written back. Use quoted strings for identifiers that must remain exact, and use a specialised parser for arbitrary-precision numeric data. Duplicate keys are another risk: ordinary JSON parsing can retain only the last value.

STEP 04

Share the smallest useful example

Copy only the fields needed to explain the issue. State the expected structure and the actual problem alongside the sample. A formatter can make the data readable, but it cannot prove that an API will accept it or that the values satisfy business rules.

If you turn JSON into CSV, inspect the column mapping and nested fields. A spreadsheet may interpret leading zeros or formula-like strings differently. Keep the original structured version and test a small sample before converting the full dataset.

Explore JSON to CSV ↗

PUT IT INTO PRACTICE

Worked example: an identifier is not a quantity

Suppose an account code is 00127. Representing it as the number 127 removes the leading zeros; formatting cannot recover them. The string "00127" preserves the intended identifier. Decide the type based on meaning, not on whether every character looks numeric.

Similarly, "false" is a string while false is a boolean. Both can occur in syntactically valid JSON, but a system expecting a boolean may reject the string. Formatting helps you spot the difference; it does not choose the correct contract for you.

YOUR FINAL CHECK

Ready to finish?

0 of 5 checks completed. This list stays in this page only.

Common questions

Does formatting validate my API request?

It validates JSON syntax only. Required properties, value ranges and business rules depend on the API’s schema. Check that documentation and test using a non-production sample.

Can I restore comments after formatting?

Standard JSON does not support comments. Keep explanations in surrounding documentation or use a format that explicitly supports them if your receiving system accepts it.

Something unclear or inaccurate? Report a correction with the step and a non-sensitive example.