Skip to content
BEAD

JSON Formatter & Validator

Pretty-print, minify, and validate JSON.

Output
0 bytes

🔒 Parsing happens entirely in your browser.

</>Use this tool programmaticallycurl · JavaScript · MCP

Same tool, callable from any HTTP client or from Claude (via MCP). Anonymous: 100 req/day per IP. Sign up for 1,000 req/day.

curl
curl https://api.b-e-a-d.com/tools/json-formatter/run \
  -H "Content-Type: application/json" \
  -d '{
  "input": "your input here",
  "mode": "pretty",
  "indent": 2
}'
JavaScript (fetch)
const res = await fetch("https://api.b-e-a-d.com/tools/json-formatter/run", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "input": "your input here",
  "mode": "pretty",
  "indent": 2
}),
});
const data = await res.json();
console.log(data.result);
MCP (Claude Desktop / Claude Code)
# In Claude Desktop / Claude Code, add to your MCP config:
{
  "mcpServers": {
    "bead": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.b-e-a-d.com"]
    }
  }
}

# Then ask Claude to call:
mcp__bead__bead_json_formatter

Full reference: developer docs · OpenAPI spec

About this tool

Uses the browser's native JSON.parse and JSON.stringify. Errors point to the byte offset reported by the parser, which usually pinpoints the bad character.

Frequently asked

Why not just use JSON.stringify(x, null, 2) in DevTools?

You can, but only when you already have the value in a JS context. The formatter accepts pasted text — including JSON pulled out of logs or curl responses — and validates it as it formats, surfacing parse errors with positions.

What indent should I pick?

2 spaces matches Prettier and most config files. 4 spaces matches the Python convention. Tab is best when the file ships to mixed environments. Whatever you pick, stick with it across a project.

Does it sort keys or otherwise rewrite the structure?

No. The formatter only normalizes whitespace. Keys stay in their original order, numbers stay in their original form, and strings are preserved byte-for-byte.

You might also like

Used in these workflows