Skip to main content

Developer

How to format JSON

A practical guide to valid JSON syntax and readable formatting.

Published 2026-09-23

What JSON looks like

JSON represents data with objects, arrays, strings, numbers, booleans, and null. Object keys and string values use double quotes.

Common mistakes

Trailing commas, single quotes, comments, and unquoted keys are common reasons JSON fails validation. Remove those before sending JSON to an API or configuration parser.

Keep data local

When formatting private JSON, use a local browser tool whenever possible. Do not paste credentials, tokens, or personal data into services you do not control.