DevTools.at
API Documentation
POST/api/v1/json

JSON Format

Format and validate JSON data

formatters

Parameters

inputstring
Yes

JSON string to format

indentnumber
No

Indentation spaces

Default: 2

Example Request

curl -X POST https://devtools.at/api/v1/json \
  -H "Content-Type: application/json" \
  -d '{"input":"{\"name\":\"test\",\"value\":123}","indent":2}'

Example Response

{
  "success": true,
  "data": {
    "result": "{\n  \"name\": \"test\",\n  \"value\": 123\n}"
  },
  "meta": {
    "processingTime": 1
  }
}

Try it out

Test this endpoint directly in your browser

Response
Click "Execute Request" to see the response