JSON Formatter
Paste or upload JSON to format it with clean indentation, validate it, and explore it as a collapsible tree. Everything runs locally.
Input JSON
LocalOutput
—About JSON Formatter
The JSON Formatter takes raw or minified JSON and re-prints it with consistent indentation, then lets you walk the structure as a collapsible tree. It is built for developers debugging API responses, config files, or log payloads who want to read and verify JSON quickly without pasting it into an online service that stores it.
API responses and config blobs often arrive as a single unreadable line. Formatting them locally keeps potentially sensitive payloads on your machine while giving you indentation, a structure view, and precise error locations the moment something is malformed.
Step by step
- Paste your JSON into the input panel, or use “Upload .json” to load a file from disk.
- The formatter parses and re-indents it automatically; the tree view on the right reflects the structure.
- If the JSON is invalid, read the error message — it names the line and column where parsing failed.
- Use the toolbar to switch between formatted and minified output, or collapse branches in the tree to focus on one section.
- Click Copy to put the formatted result on your clipboard, or Download to save it as a .json file.
What it offers
- Clean indentation formatting
- Inline validation
- Collapsible tree explorer
- Paste or file upload
Tips for best results
- For very large files, collapse the tree branches you are not inspecting to keep the view responsive.
- If you only need a compact result for a request body, use the Minifier instead of formatting then re-stripping.
- When an error points to a line, check the character just before it — a trailing comma or unquoted key is the usual cause.
Why people use it
Local parsing
Your JSON is parsed in the browser with the native engine, so nothing is uploaded or logged.
Precise errors
Invalid input is reported with the exact line and column, not a vague “parse error”.
Tree exploration
A collapsible tree makes deeply nested objects and arrays easy to navigate.
No setup
Works in any modern browser with no extension, account, or install.
Common questions
This runs entirely in your browser
No file or text you enter here is uploaded. Encoding and decoding happen on your device using native browser APIs — close the tab and nothing remains on a server.