📋

JSON Formatter API

Format, validate, and transform JSON data via API. Pretty-print for readability, minify for production, or validate structure.

API Endpoint

POST /v1/json

Parameters

Name Type Required Description
jsonstringYesJSON string to process
actionstringNoAction: format, minify, or validate (default: format)
indentintegerNoIndentation spaces (default: 2)

Quick Example

curl -X POST "https://api.toolcenter.dev/v1/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"json": "{\"name\":\"John\",\"age\":30}", "action": "format"}'

Features

  • Pretty-print with custom indentation
  • Minification for production
  • JSON validation with error details
  • Sort keys alphabetically
  • Handle large JSON payloads

Use Cases

Format API responses for debugging

Validate JSON config files

Minify JSON for production payloads

Build online JSON tools

Start Using JSON Formatter API for Free

500 free API calls per month. No credit card required.

Get Started Free