When formatting helps
Use a formatter when the important question is structure: which keys exist, which values are arrays, whether a value is null, and whether a nested object is in the place you expected. Pretty printing makes those relationships visible without changing the data.
Minifying is useful for transport, but it is a poor review format. If a payload is going into a ticket, a pull request comment, or a support handoff, format it first and copy only the relevant fragment.
- Check API responses before comparing them with documentation.
- Review feature flag or app configuration files before committing them.
- Spot copied trailing commas, comments, or single quotes that are valid in JavaScript but invalid in strict JSON.
- Create a clean sample payload for a bug report without including private fields.