JSON Formatter & Minifier
Pretty-print JSON for readability, or compact it to one line. This tool beautifies and minifies JSON on one page — paste your code, pick a mode, and click. Everything runs on your device, nothing is sent to a server.
Everything runs in your browser. Your code is never sent to our servers.
Example
Example Input
{"name":"Aji","tags":["a","b"]}Example Output
{
"name": "Aji",
"tags": ["a", "b"]
}How to Use
- 1Choose Format or Minify mode at the top.
- 2Paste your JSON code into the Input field.
- 3If needed, set the indent width in "More settings".
- 4Click the button (or press Ctrl+Enter) to process. The result appears in the Output field.
- 5Click Copy to copy the result.
About the JSON Formatter
The JSON Formatter prettifies JSON data with consistent indentation so object and array structure is easy to read, or compacts it (minify) by removing all whitespace for the smallest size.
How it works: the tool parses your JSON with the browser's built-in JSON.parse, then rewrites it (JSON.stringify) with your chosen indentation for Format, or with no whitespace for Minify. If the JSON is invalid, an error message explains the problem.
JSON is everywhere: APIs, config files, and data storage. Formatting JSON helps debugging and readability; minifying it reduces transfer size in production.
FAQ
Can this JSON tool both format and minify?
Yes. One page with a toggle — Format mode prettifies (beautifies) with indentation, and Minify mode compacts it. No need for two separate pages.
Is my code sent to a server?
No. JSON is processed entirely in your browser using JavaScript/WebAssembly. Your code never leaves your device.