Build tools, API responses, and database exports produce minified JSON to save space.
Loading JSON Formatter…
Expands single-line JSON to full indented format
Works with any minified JSON from any source
Syntax highlights keys, values, and types
No size limits for typical use cases
Drop the JSON Formatter into any page — blog post, product docs, intranet, school portal — with a single line of HTML. Your visitors get the full tool, processed entirely in their browser. No backend, no uploads, no signup.
Embed code
<iframe
src="https://www.fixtools.io/json/json-formatter?embed=1"
width="100%"
height="780"
frameborder="0"
style="border:0;border-radius:16px;max-width:900px;"
title="JSON Formatter by FixTools"
loading="lazy"
allow="clipboard-write"
></iframe>Attribution-friendly: a small "Powered by FixTools" link appears in the embed footer.
JSON minification removes all whitespace characters that are not inside string values: spaces after colons and commas, newlines between key-value pairs, and the indentation at every nesting level. The resulting text is a single line with no spaces except inside string values themselves. For a simple object like {"name": "Alice", "age": 30}, the minified form is {"name":"Alice","age":30}, saving seven characters. For a deeply nested API response with hundreds of fields, minification can reduce size by 20 to 50 percent. Build tools like webpack and rollup minify JSON assets for this bandwidth saving, and production APIs return minified JSON by default for the same reason.
RFC 8259 defines whitespace in JSON as insignificant between tokens. Minification exploits this definition: removing whitespace produces a document that any compliant JSON parser reads identically to the formatted version. The parser sees the same tokens in the same order and produces the same data structure; it simply has fewer whitespace characters to skip. This is why minification has zero effect on parsed data and why expanding minified JSON with a formatter accurately restores the original structure. The output of expanding minified JSON is byte-for-byte equivalent in parsed meaning to the original.
Expanding minified JSON provides two practical benefits beyond basic readability. First, it enables effective searching: finding a key named "userId" in 10,000 characters of single-line JSON requires a find-in-page search through a wall of compressed text. In formatted JSON, each key is on its own line and the nesting depth is visually clear. Second, it enables meaningful comparison: two minified JSON documents that differ in one field look nearly identical as single lines, while formatted versions expose the difference at the correct indentation level immediately, making it easy to spot added, removed, or changed fields.
Minified JSON also makes certain spec edge cases nearly invisible. A trailing comma left over from a hand edit may sit at position 8,500 of a single line where no parser error highlight will help you find it visually. Duplicate keys, which RFC 8259 permits but most parsers handle by keeping the last value, are easy to miss in a compressed line where the same key may appear hundreds of characters apart. Unicode escape sequences like \u200B (zero-width space) inside string values can look identical to neighbouring characters in minified text but cause string comparisons to fail. Expanding the JSON puts each key on its own line, surfacing duplicates immediately, and isolates each string value so invisible Unicode characters become apparent when the value does not match what the eye expects.
Expanding minified JSON also clarifies how key ordering interacts with downstream tools. JavaScript and Python preserve insertion order in modern runtimes, so minified output from those languages typically reflects the order fields were assigned. Go encoding/json sorts map keys alphabetically by default, which means a minified Go-produced JSON document will have keys in a different order than the same data minified from Python even though the data is identical. Expanding both reveals the alphabetical layout for the Go output and the insertion order for the Python output, which is critical when comparing exports from a mixed-language stack. Tools like canonical JSON or the npm package json-stable-stringify enforce alphabetical order on output regardless of source language, producing byte-identical output across languages for cryptographic hashing or deterministic diffing.
Paste your minified single-line JSON here. Click Format to expand it to a fully indented, readable structure.
Step-by-step guide to format minified json, single line to readable:
Copy the minified JSON
Copy the single-line or compressed JSON from your source: an API response body, a build output asset, a log file entry, or a database field value. If the JSON is inside a larger text document, identify the start of the JSON by finding the first opening brace or bracket and copy from that character to the matching closing character.
Paste into FixTools
Open FixTools in your browser and paste the minified JSON string directly into the JSON Formatter input area. The input accepts a raw JSON string of any length. If the content begins and ends correctly with matching braces or brackets, the formatter can process it regardless of how compressed or dense the content is.
Click Format
Click the Format button. The formatter validates the JSON using the browser's native parser, then re-serializes it with full indentation and syntax highlighting. The output expands from a single dense line into a multi-line structure with each key on its own indented line. For a 10,000-character single-line object, the expanded output may run to several hundred readable lines.
Read or copy
Scroll through the expanded output to understand the data structure, then copy it using the Copy button for use in documentation, a code comment, or a debugging session. Use Ctrl+F or Cmd+F in your browser to search for specific key names in the formatted output without scrolling manually through every line.
Common situations where this approach makes a real difference:
Webpack developer
Build tool JSON assets are almost always minified in production but need to be readable for maintenance.
Operations engineer
Structured log payloads are minified for aggregation efficiency but need expansion for human reading.
Mobile developer
Understanding a minified data file's full schema before writing a parser prevents access path errors.
Code reviewer
Formatting minified files before diffing makes code reviews of JSON changes practical and reliable.
Get better results with these expert suggestions:
Minify JSON for production, format for development
Use formatted JSON in version-controlled config files so pull request diffs are readable and code reviews are meaningful. Use minified JSON in production API responses and build assets to reduce payload size and bandwidth costs. Maintain a single formatted source file and generate the minified version as part of your build process rather than committing both forms, which would create maintenance burden and confusing diffs.
Use jq to expand minified JSON in a terminal
In a terminal, the command jq . file.json or echo '{"a":1}' | jq . expands and pretty prints minified JSON. jq is available on macOS via Homebrew (brew install jq), on Linux via apt or yum, and on Windows via winget. It is faster than switching to a browser for command-line workflows and also supports field extraction and transformation for more complex operations.
Check that minification did not corrupt the JSON
Some minifiers have edge-case bugs that produce invalid JSON, such as incorrectly removing spaces from inside string values that contain whitespace sequences. If a minified file produces unexpected parse errors or behaves differently than the original, expand it in FixTools and validate it to confirm the minified form is still syntactically correct RFC 8259 JSON before assuming the problem is elsewhere.
Avoid committing minified JSON to source control
Minified JSON makes pull request reviews nearly impossible because every line in the file appears as changed whenever the data is updated. Commit the formatted version and add a build step to generate the minified version as a build artifact. This keeps your git history readable, your diffs focused on actual data changes, and your code reviews productive rather than filled with whitespace noise.
More use-case guides for the same tool:
Other tools you might find useful:
Open the full JSON Formatter — free, no account needed, works on any device.
Open JSON Formatter →Free · No account needed · Works on any device