Handytool
DocumentRuns locally

JSON formatter

Pretty-print, minify and validate JSON.

.json
Indent
Input
0 lines0 bytes
Output
0 lines0 bytes

About the JSON formatter

Paste any JSON and Handytool's JSON formatter pretty-prints, minifies and validates it instantly — right inside your browser. Pick 2-space, 4-space or tab indentation, spot syntax errors with a precise message, then copy or download the result. Nothing is uploaded, so API payloads, config files and database dumps stay on your machine.

JSON formatter features

  • 01

    Format, minify and validate

    Pretty-print messy JSON, collapse it to a single line for network calls, or validate without changing the input. The formatter surfaces the exact error location when parsing fails.

  • 02

    Configurable indentation

    Switch between 2-space, 4-space and tab indentation in one click. The output updates immediately so you can match your project's style.

  • 03

    100% private, works offline

    Your JSON never leaves your device. Formatting runs in your browser with the native JSON engine, so the tool keeps working even without a network connection.

JSON formatter FAQ

How do I format JSON in the browser?
Paste your JSON into the left pane and click Format. The right pane will show a pretty-printed version using your chosen indentation. Nothing is uploaded — formatting happens locally.
What's the difference between format and minify?
Format (or beautify) adds indentation and line breaks so the JSON is easy to read. Minify strips every optional whitespace character to produce the smallest valid JSON — useful for network payloads and storage.
Why is my JSON invalid?
Common causes are trailing commas, single quotes around strings, unquoted keys, or comments — none of which are allowed by the JSON specification. The error message shows the position where parsing failed.
Is my JSON sent to a server?
No. The tool runs entirely in your browser using JavaScript's built-in JSON parser. Your data is never uploaded, logged or stored.
Is there a size limit?
No hard cap, but very large documents (tens of megabytes) may take a moment to render. The formatter handles typical API responses and config files instantly.
Is the JSON formatter free?
Yes. Every Handytool is free, with no accounts, sign-ups or usage limits.

Related tools

Document

Explore other tools

All tools