Format JSON Online

Paste JSON, choose Format to read its structure or Minify to make it one line. The tool checks syntax when you run either action and lets you copy the result.

Format or minify JSON

1
Output
1

How to format JSON in 3 steps

01

Paste the JSON input

Paste a JSON string into the input. Syntax is checked when you select Format or Minify.

Choose the action for your task

You needActionCheck the result
Read an API response or configPaste JSON and select Format. The tool uses two-space indentation and colors values.Review keys, arrays and values before copying.
Get a compact JSON stringSelect Minify. Whitespace outside strings is removed; whitespace inside string values remains.Compare Input and Output sizes; the result is not always smaller than the input.
Check JSON syntaxRun Format or Minify. Both parse the JSON before producing output.If parsing fails, read the browser error, correct the input and run it again.

If JSON does not produce the expected result

Syntax error
Check for trailing commas, comments, quoted property names and matching brackets. The tool accepts standard JSON and does not repair invalid input.
Numbers or key order look different
The tool rebuilds text with JavaScript JSON.parse and JSON.stringify. For very large integer IDs or systems that need the original representation, compare with the source and use a suitable parser before relying on the output.
Large input slows the page
Parsing and highlighting happen in the browser tab. Split the input or use a local tool suited to large files.

Where is your JSON processed?

Format and Minify run in the browser tab; this tool does not send pasted JSON to an KitoTool JSON processing API. Clear removes the input and result from the interface. Follow your organization’s policy when handling sensitive data.

Comments & feedback

Rate this tool

Loading ratings…

Write a commentNo account needed

Do not share passwords, sensitive information or the contents of files you are processing.

Reviewed before posting. Email stays private.

Embed this tool on your websiteFree · Copy once, receive tool updates automatically

Paste the iframe into HTML, WordPress or any platform that supports embeds. The tool runs in the visitor’s browser; adjust its height and theme as needed.

View the embed guide and supported platforms →

<div style="max-width:900px">
  <iframe data-kitotool-embed src="https://kitotool.com/embed/en/json-formatter/" title="JSON Formatter — KitoTool" width="100%" height="1050" style="display:block;width:100%;border:1px solid #dbe3ee;border-radius:12px" loading="lazy" referrerpolicy="strict-origin-when-cross-origin"></iframe>
  <p style="margin:6px 2px 0;text-align:right;font:12px/1.5 system-ui,sans-serif;color:#64748b">Free tool by <a href="https://kitotool.com/en/json-formatter/" target="_blank" rel="nofollow noopener noreferrer" style="color:#2359d4;text-decoration:underline">KitoTool</a></p>
</div>

The code includes a visible credit below the iframe; its link uses nofollow for a widely distributed widget.

Optional: automatically resize the iframe

Add this script once to the page containing the iframe.

<script>
(function(){var origin="https://kitotool.com";function frames(){return document.querySelectorAll("iframe[data-kitotool-embed]")}function measure(f){if(f.contentWindow&&new URL(f.src).origin===origin)f.contentWindow.postMessage({type:"kitotool:measure"},origin)}window.addEventListener("message",function(e){if(e.origin!==origin||!e.data||e.data.type!=="kitotool:resize"||!Number.isFinite(e.data.height))return;frames().forEach(function(f){if(f.contentWindow===e.source&&new URL(f.src).origin===origin)f.style.height=Math.max(320,Math.min(12000,Math.ceil(e.data.height)))+"px";});});function connect(){frames().forEach(function(f){f.addEventListener("load",function(){measure(f)});measure(f)})}if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",connect,{once:true});else connect()})();
</script>