JSON formatter
Pretty-print, minify and validate JSON.
How to use the JSON formatter
- 01
Paste your JSON
Paste any JSON — API response, config file or database dump — into the input pane on the left.
- 02
Format, minify or validate
Click Format to pretty-print with your chosen indentation, Minify to collapse to one line, or Validate to check without changing the input.
- 03
Copy or download the result
Copy the formatted JSON to your clipboard or download it as a .json file. Nothing is uploaded.
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.
Guides
Articles →Related tools
Document →Explore other tools
All tools →- Live
Sign PDF online
Sign a PDF online for free. Drop a PDF, draw or type your signature, drag it exactly where it belongs on any page, and download the signed PDF — all in your browser.
PDFFreeRuns locallyOpen - Live
WebP to PNG
Convert WebP images to lossless PNG in your browser — files never leave your device.
ImageFreeRuns locallyOpen - Live
WebM to MOV
Convert WebM videos to MOV (QuickTime) in your browser — files never leave your device.
VideoFreeRuns locallyOpen - Live
MP3 to WAV
Convert MP3 audio to uncompressed WAV in your browser — files never leave your device.
AudioFreeRuns locallyOpen - Live
Paraphrasing tool
Rewrite any sentence or paragraph in your own words with six AI rewriting modes — free, multilingual, meaning preserved, no sign-up.
AIFreeOpen