Formats JSON with proper indentation and spacing for readability. Call via MCP in Cursor or Windsurf, or hit the REST endpoint `/v1/encode/json/prettify`. Pass minified JSON like `{"name":"John","age":30}` and get back cleanly formatted output with consistent 2-space indentation. Validates JSON syntax while formatting.
curl "https://tinyfn.io/v1/encode/json/prettify" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/encode/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/encode/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 encoding tools:
{
"mcpServers": {
"tinyfn-encoding": {
"url": "https://tinyfn.io/mcp/encoding",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Call the json_prettify function with your JSON string as input. Works in Cursor, Claude Code, Windsurf, and other MCP-compatible editors to format minified JSON with proper indentation.
Uses 2-space indentation with consistent formatting. Objects and arrays are properly nested with each key-value pair on its own line.
Yes, it validates JSON syntax and returns an error for malformed input. Invalid JSON won't be processed, ensuring you only get valid, formatted output.
Yes, handles JSON of various sizes including API responses, configuration files, and data exports. Maintains all data while improving readability.
Send a GET request to `/v1/encode/json/prettify` with your JSON string as a parameter to get formatted output via HTTP.
Get your free API key and start using Json Prettify in seconds.
Get Free API Key