Formats compressed JSON strings into readable, indented output with proper line breaks and spacing. Use via MCP in Cursor or Claude Code, or call GET /v1/json/prettify with your JSON string. Returns consistently formatted output with 2-space indentation. Essential for debugging minified API responses and config files.
curl "https://tinyfn.io/v1/json/prettify" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/json/prettify', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/json/prettify',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's json tools:
{
"mcpServers": {
"tinyfn-json": {
"url": "https://tinyfn.io/mcp/json",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Call the json_prettify tool with your JSON string as input. The MCP tool handles URL encoding and returns formatted JSON with proper indentation and line breaks.
Prettify adds whitespace, indentation, and line breaks for readability. Minify removes all unnecessary whitespace to reduce file size. They're opposite operations.
Yes, invalid JSON will return an error response. The tool parses the JSON first, so malformed syntax like missing quotes or trailing commas will be caught.
The tool uses 2-space indentation by default. For custom formatting options, you'd need to process the output further or use a different formatting approach.
The tool handles large JSON strings but consider performance for multi-MB files. For massive datasets, consider streaming or chunking the JSON processing.
Get your free API key and start using Prettify Json in seconds.
Get Free API Key