Skip to main content
Back to tools

Prompt Formatter

Format prompts as Claude XML or ChatGPT and Gemini API JSON

About Prompt Formatter

Wraps a user prompt and an optional system prompt in one of four layouts: Claude-style XML tags, a ChatGPT Chat Completions JSON body, a Gemini contents-and-parts JSON body, or plain text. The JSON options set the model to gpt-4o or gemini-2.0-flash, so change it if you target another model. Only one user message is supported, with no assistant turns or multi-turn history.

Category: AI Tools.

Frequently asked questions

Which output formats are supported?

▾

Four. Claude (XML) wraps the text in <system> and <instruction> tags, ChatGPT (JSON) builds a Chat Completions body with system and user messages, and Gemini (JSON) builds a contents array of role and parts objects. Raw Text places the system prompt, labeled "System:", above your prompt.

What is a system prompt?

▾

Instructions given to the model before the conversation begins. Used to define the assistant's persona, output format, constraints, or domain knowledge.

Can I send the Claude output straight to the Anthropic API?

▾

Not as a request body. The Claude (XML) option produces tagged prompt text, following Anthropic's advice to structure prompts with XML tags, while the Messages API expects JSON with a top-level system field and a messages array. Put the system text in that field and the rest in a user message, or paste the whole block into a chat.

Why does the Gemini output put my system prompt in a model turn?

▾

The Gemini (JSON) option inserts your system text as a first turn with role "model", prefixed with "Instructions:", followed by your prompt as a "user" turn. If you call the Gemini API directly, you can use its dedicated systemInstruction field instead; the REST endpoint also expects the model name in its URL.

Related tools