Skip to main content

Controlling Claude's Output Format: Tables, JSON, and Lists

How to get answers in the format you want — tables, JSON, or lists — by naming the format clearly and locking it down with an example.

ByUpdated
🌐 This article was machine-translated and may contain inaccuracies. Read the Korean original if in doubt.

The same question is far more useful when the answer comes back as a table, as JSON, or as prose, depending on what you need. Claude follows the output format you ask for, so simply being clear about the format makes the result much easier to work with.

🟢 Model references match the current lineup · model notice · Fable subscription
🟢 Model references match the current lineup · Claude Opus 5.5 / Claude Sonnet 5 / Claude Haiku 4.5 (higher tier: Claude Fable 5.1). This notice changes only when Anthropic ships a new model.

Fable 5 and 5.1 subscription (updated September 7, 2026): Claude Fable 5.1, released September 1, 2026, is the current Fable model and Fable 5 is now legacy. Plan terms are the same for both — Max and Team Premium plans include Fable at up to 50% of the weekly usage limit; Pro and Team Standard use usage credits (

🟢 Model references match the current lineup · Claude Opus 5.5 / Claude Sonnet 5 / Claude Haiku 4.5 (higher tier: Claude Fable 5.1). This notice changes only when Anthropic ships a new model.
0/M input, $50/M output tokens). The one-time
🟢 Model references match the current lineup · Claude Opus 5.5 / Claude Sonnet 5 / Claude Haiku 4.5 (higher tier: Claude Fable 5.1). This notice changes only when Anthropic ships a new model.
00 credit applied only to the Fable 5 transition and is not offered for 5.1. Some coding and debugging requests may be answered by an Opus model due to a security classifier (both models). See the Fable 5.1 guide and the Fable 5 availability guide for details.

⚡ TL;DR
  • Specify the format to get a table, JSON, or prose as you want.
  • You can lock the format with an example.
  • There's a way to get clean JSON only.
  • Includes tips for when you need stricter structure.
Specify the format and Claude follows it Prompt "Format it as a table" Table JSON { } List

Name the format clearly

The basic move is to state the format precisely in words. Call the format by name — "format it as a table", "respond with JSON only", "give me a numbered list" — and it is even more reliable if you also say which columns a table needs or which keys a JSON object needs.

  • Table — for comparing or organizing items. Specify the column names you want.
  • JSON — for using the result directly in code or storing it as data. Define the key names and structure.
  • List — for laying out steps or items. Decide whether it should be numbered or bulleted.

Lock the format with an example

If the format is complex or you need the exact same shape every time, showing one example of the form you want is the most reliable approach, because Claude follows the structure of the example. This works on the same principle as giving examples (few-shot).

Organize this as the following table.
| Name | Trait | Best for |
| --- | --- | --- |
| (fill this in) |

Get clean JSON only

If you want to use JSON directly in code, a preamble like "Here is the JSON you requested" makes parsing a nuisance. In that case, tell Claude explicitly to drop the extra text — "output only JSON, no explanation". Defining the keys and value shapes in advance makes the result steadier.

If you are using the API, you can prefill the start of the assistant response so the answer begins with {, which prevents a leading explanation. This is an API-only feature that the web and app chat do not have.

When you need stricter structure

When valid JSON must be guaranteed every time, a prompt alone can occasionally drift from the format, so it is safer to add a step that validates the output. On the API, defining an input schema with tool use lets Claude fill values into that structure, which enforces the format more firmly.

3 steps to reliable formatting 1 · Name it table/JSON/list 2 · Lock w/ example one sample shape 3 · Cut filler "no explanation"

In short, naming the format, locking it with an example when needed, and asking it to cut the filler will solve most formatting problems. For more, see the official Anthropic documentation.

Frequently asked questions

How do I specify the output format?

Say it clearly — "as a table," "give me JSON," "in three paragraphs" — and Claude matches it.

How do I get clean JSON only?

Specify "output JSON only, no explanation" and show the key structure as an example to avoid extra text.

What if the format isn't followed?

Add one or two examples of the desired format to lock it in; for stricter needs, state the schema.

To automate the same task in code, Claude API structured outputs lets you enforce a JSON schema.

To summarize a long document first and then shape the format, see summarizing documents with Claude.

Was this helpful?

Keep reading