---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/tools/structured_data/variables/jsonFormatTool.md
description: Pretty-print or minify a JSON string.
---

# Variable: jsonFormatTool

```ts
const jsonFormatTool: Tool<SpooledArtifact>;
```

Defined in: [batteries/tools/structured\_data/index.ts:118](https://github.com/NHTIO/ADK/blob/v1.20260605.0/src/batteries/tools/structured_data/index.ts#L118)

Pretty-print or minify a JSON string.

## Remarks

Validates the input as JSON, then re-serialises it with the requested indentation. `indent` is
clamped to the range \[0, 8]; `0` produces minified output.
