Utila
EntrarCriar conta

informational guide · Updated 2026-08-12

JSON formatting best practices

Indentation, minification, secrets handling, and team conventions for JSON formatting.

Indentation

Pick a team indent (often 2 spaces) and stick to it so diffs stay readable.

Minify vs beautify

Beautify for humans; minify for transport size when appropriate. Do not confuse either step with validation.

Secrets

Never paste live credentials into public pages. Generate UUIDs and fake IDs for fixtures instead.

Fixtures

Store canonical fixtures in your repository so formatting tools become a convenience, not the source of truth.

Primary tool: JSON Formatter

Frequently asked questions

Should commit hooks format JSON?

Yes when JSON is hand-edited. Keep generated lockfiles under their own conventions.

Related tools

Related guides

Browse developer tools