Practical guide

Debug JSON and avoid accidental data loss

Validate first, format for humans, and make only changes you can explain.

Separate invalid syntax from unexpected data

Paste the original into JSON Formatter and choose Prettify. If it reports an error, the problem is syntax: a missing quote, comma, bracket or an invalid escape. Fix the reported location in a copy, not in the only source you have.

If it formats successfully but an API still rejects it, inspect values and types. The strings "12" and the number 12 look similar but are different JSON values; likewise, null, false and an absent key often carry different meanings.

Use sorting only for comparison

Sorting object keys can make two payloads easier to compare line by line. Array order is preserved. However, Nekhen parses and re-serializes the whole value even when sorting is off; formatting is not a byte-preserving operation.

Still, avoid sending a sorted copy to a system that signs the original request bytes or has a snapshot or display expectation. Formatting is a diagnostic aid; preserve the original request body until you understand the integration.

Decode wrappers before editing

A value may be JSON inside a URL-encoded parameter or Base64 text. Decode the wrapper first, inspect the JSON, and re-encode only after editing. Base64 is encoding, not encryption; never treat a Base64 token as safe to publish merely because it is unreadable at a glance.

The tools operate in the browser, which is useful for sensitive debugging, but local processing does not make it safe to paste credentials into a screen recording, issue tracker or chat.

Try a syntax error, then check for lossy values

Paste {"quantity":"12",} and choose Prettify. Remove the trailing comma to obtain valid JSON. If the receiving API requires a number, {"quantity":12} is the relevant correction; formatting alone will not turn the string into a number.

Keep an untouched original when precision matters. Nekhen uses JavaScript numbers: {"id":9007199254740993} becomes {"id":9007199254740992} after formatting. Likewise {"mode":1,"mode":2} keeps only the last mode value. Do not use this formatter to round-trip exact large-number data or investigate duplicate members; use a parser that preserves those tokens.

As a wrapper exercise, decode eyJvayI6dHJ1ZX0= in Base64 to obtain {"ok":true}, then paste it into JSON Formatter. Decode only the Base64 section of a token, not an entire dotted JWT; decoding does not verify its signature.

Tools used in this workflow