OpenAI ↔ Anthropic Format Converter
Paste source JSON to convert...
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
What This Tool Does
OpenAI ↔ Anthropic Format Converter is built for deterministic developer and agent workflows.
Convert between OpenAI and Anthropic API formats. Messages, tools, and responses with automatic format detection and conversion notes.
Use How to Use for execution steps and FAQ for constraints, policies, and edge cases.
Last updated:
This tool is provided as-is for convenience. Output should be verified before use in any production or critical context.
Agent Invocation
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.
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.