Attest tools · Developer utilities: cron, regex, UUID, slug and JSON

Pretty print JSON

Format a compact JSON document with indentation and sorted keys.

0 credits per successful call

Input JSON

{
  "operation": "json_format",
  "text": "{\"stock\":3,\"item\":\"linen\"}",
  "indent": 2,
  "sort_keys": true
}

Captured output JSON

{
  "operation": "json_format",
  "valid": true,
  "formatted": "{\n  \"item\": \"linen\",\n  \"stock\": 3\n}",
  "indent": 2,
  "sort_keys": true,
  "minified": false,
  "input_length": 26,
  "output_length": 35,
  "depth": 1,
  "counts": {
    "objects": 1,
    "arrays": 0,
    "strings": 3,
    "numbers": 1,
    "booleans": 0,
    "nulls": 0
  },
  "duplicate_keys": 0,
  "numbers_losing_precision": 0,
  "unpaired_surrogates": 0,
  "limits": {
    "max_text_length": 1048576,
    "max_depth": 500,
    "max_indent": 8,
    "max_output_length": 4000000
  },
  "source": "Parsed and re-serialised locally with the runtime's own JSON implementation; syntax errors are located by the RFC 8259 scanner in lib/dev_utils-json.mjs.",
  "warnings": [],
  "notice": "General information only, computed from the caller's own input. Nothing sent here is stored.",
  "checked_at": "2026-10-20T20:47:47.506Z"
}

API call

curl -s -X POST https://getattest.com.au/api/v1/dev \
  -H "authorization: Bearer $ATTEST_API_KEY" \
  -H "content-type: application/json" \
  --data-raw '{"operation":"json_format","text":"{\"stock\":3,\"item\":\"linen\"}","indent":2,"sort_keys":true}'

Run this call with your own bearer key. Issue an API key.

About this example

The input was validated and run locally through the registered service. The output above is a display preview of the captured service result. File bytes are described instead of printed, and strings longer than 400 characters are truncated; the HTTP API also adds call_id, credits_charged and credits_remaining. Timestamps and generated identifiers will vary.

Source: apps/api/svc/dev_utils.mjs

Tool reference and limits · API key guide