AbraCalc

JSON Minify / Beautify

Pretty-print JSON with configurable indentation, or minify it to a single compact line. Runs in your browser.

Pure browser JavaScript — no external libraries.

Embed this tool on your site
Cite this tool

APA

AbraCalc. (2026). JSON Minify / Beautify [Online calculator]. Retrieved from https://abracalc.com/app/json-minify-beautify/

BibTeX

@misc{abracalc-json-minify-beautify, author = {AbraCalc}, title = {JSON Minify / Beautify}, year = {2026}, howpublished = {\url{https://abracalc.com/app/json-minify-beautify/}} }

Did this tool answer your question?

How to use this tool

  1. Paste JSON or upload a .json file.
  2. Pick the indent (2 / 4 spaces or tab) and click Beautify, or click Minify to compress.
  3. Copy or Download the result.

Pretty-print JSON with configurable indentation, or minify it to a single compact line. Runs in your browser.

How it works

This tool has two modes: Beautify (pretty-print) formats compact or unreadable JSON with consistent indentation so it is easy to read and diff; Minify strips all unnecessary whitespace to produce the smallest possible JSON string for transmission or storage.

Paste any valid JSON into the input. In Beautify mode, choose the number of spaces per indent level (typically 2 or 4). In Minify mode, the output is a single line with no extra characters. Both operations run instantly in your browser.

Beautify is useful for debugging API responses, reading config files, and reviewing data structures. Minify is useful for reducing the size of JSON payloads in production APIs, localStorage, or configuration bundles.

The tool also validates your JSON and shows a parse error if the input is malformed, making it a handy quick validator.

Worked example

Beautify a minified API response for debugging

  1. Copy the compact JSON string from your browser's network tab.
  2. Paste it into the tool.
  3. Select Beautify mode with 2-space indentation.
  4. Click Format.
  5. Read the indented output to understand the structure.

The same JSON data rendered with line breaks and indentation, making nesting levels immediately visible.

Common mistakes to avoid

  • Pasting JavaScript object literals (with unquoted keys or trailing commas) instead of valid JSON.
  • Minifying JSON that will be hand-edited later — always keep a readable copy before minifying.
  • Assuming beautified JSON is permanently formatted output — the tool only adjusts whitespace, not key ordering.

Key terms

Pretty-print
Formatting a data structure with line breaks and indentation to improve human readability.
Minify
Removing all non-essential whitespace from JSON to reduce its byte size.
JSON validation
The process of checking that a JSON string follows correct syntax; the tool reports the line and position of any error.

Frequently asked questions

Is my JSON validated?
Yes — it is parsed first, so invalid JSON is rejected with the parser's error message before formatting.
Does minify change my data?
No — it only removes insignificant whitespace; keys, values, and ordering are preserved.

References & sources