A config file gets read by a human — usually a confused one, at 11pm, trying to figure out why a deploy broke — far more often than it gets written. Formatting it for readability isn't cosmetic, it's practical.
Habits that help
- Consistent indentation, typically two or four spaces, never mixed
- Logical grouping of related keys near each other rather than scattered alphabetically
- Avoiding deeply nested structures where a flatter one would work just as well
What to avoid
Minified, single-line config files might save a few bytes, but they turn a two-second visual scan into a painful search-and-scroll exercise the next time someone needs to change a single value under pressure.
Reformatting an existing messy file
If you've inherited a minified or inconsistently indented config file, a JSON formatter will instantly re-indent it into a clean, readable structure, making it far easier to spot the specific value that needs to change.
Ready to try it? Jump back up to the JSON Formatter & Validator.