JSON formatter
Pretty-print, minify and validate JSON.
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 →- Live
PDF to JPG
Convert each page of a PDF into a sharp JPG, PNG, or WebP image right in your browser — no upload, no quality loss.
PDFRuns locallyOpen - Live
Remove background
Erase the background of a photo using an in-browser AI model — no upload, your images stay on your device.
ImageRuns locallyOpen - Live
Trim Video
Cut the start or end of a video with frame-level precision.
VideoOpen - Live
Trim audio
Cut a section of an audio file.
AudioRuns locallyOpen - Live
Password generator
Create strong, random passwords locally.
UtilityRuns locallyOpen