JSON Formatter

Paste raw JSON — from a ChatGPT, Claude, or Gemini API response — and instantly format, validate, or minify it.

Why format AI API JSON?

When you call the ChatGPT, Claude, or Gemini APIs directly, responses come back as minified JSON — hard to read at a glance. Paste the raw response here to expand it into readable, indented JSON so you can inspect the choices, usage, token counts, and any tool calls.

Common AI API JSON fields

  • choices[0].message.content — the actual text response
  • usage.prompt_tokens — input tokens consumed
  • usage.completion_tokens — output tokens generated
  • usage.total_tokens — total for billing purposes
  • model — the exact model version used

Use our Token Calculator to estimate token usage before making an API call.

Related tools

→ Token Calculator — estimate tokens before your API call
→ Prompt Generator — build structured prompts for the API