OpenAI ↔ Anthropic Format Converter
Convert chat messages, tool definitions and responses between the OpenAI and Anthropic API formats in either direction, with format auto-detection.
OpenAI ↔ Anthropic Format Converter
Conversion ready
{
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What is the capital of France?"}
]
},
{
"role": "assistant",
"content": [
{
"type": "text",
"text": "The capital of France is Paris."}
]
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "And Germany?"}
]
}
],
"system": "You are a helpful assistant."}Conversion reference
role/content strings vs content blocks, system message handling, tool_calls vs tool_use blocks
function.parameters vs input_schema, type: "function" wrapper
choices[0].message vs content blocks, finish_reason vs stop_reason, usage field mapping
Updated . Provided as is. Check the output before you rely on it in production.
How to use OpenAI ↔ Anthropic Format Converter
- 1
Convert OpenAI function_calling format to Anthropic tools
Paste OpenAI function schema (name, description, parameters.properties). Tool converts to Anthropic format (input_schema with properties and required fields). Deploy converted schema to Claude API.
- 2
Convert Anthropic tool results to OpenAI format
Paste Anthropic tool_result (tool_use_id, content). Tool reformats as OpenAI assistant message with tool_call_id and function result. Useful for multi-LLM pipelines.
- 3
Migrate agent codebase between API providers
Have many functions defined in OpenAI format? Paste all schemas, convert in bulk. Replace in your codebase with Anthropic equivalents. Reduces manual refactoring.
- 4
Validate format compatibility for multi-LLM systems
If using multiple LLMs (GPT + Claude), convert both to a neutral JSON schema. Check that conversions are semantically equivalent. Ensures consistent behavior across providers.
- 5
Handle nested objects and required field conversion
Complex schemas with nested objects convert differently. Converter handles required[] arrays and nested properties. Verify output matches your API expectations before deploying.
Questions and answers
What's different between OpenAI and Anthropic message formats?
Does this convert tool/function definitions?
What about features that don't have equivalents?
Can it auto-detect which format I'm pasting?
Is this tool private?
For AI agents: how to call this tool
Machine-readable contract, endpoints and examples. Humans can ignore this section.
Best Path For Builders
Browser workflow
Runs instantly in the browser with private local processing and copy/export-ready output.
Browser Workflow
This tool is optimized for instant in-browser execution with local data handling. Run it here and copy/export the output directly.
/api-format-converter/
For automation planning, fetch the canonical contract at /api/tool/api-format-converter.json.