Codex Chat Transfer
Paste a messages array or Markdown transcript and re-emit it as OpenAI, Anthropic, Gemini, Cohere, Llama prompt or Markdown — live as you type.
Still loading. If the tool doesn’t appear, reload this page.
About this tool
Codex Chat Transfer
Convert message arrays or Markdown transcripts into OpenAI, Anthropic, Gemini, Cohere, Llama, or Markdown output.
Codex Chat Transfer emits a conversation in six target formats used by today's chat models: OpenAI JSON, Anthropic JSON, Google Gemini, Cohere, the Llama 2/3 prompt string, and plain Markdown. Paste an array of role/content objects, a payload with a messages array, a headed Markdown transcript, or one unheaded plain-text user turn, and the selected output appears as you type. It is built for developers reshaping prompts, evaluations or saved chat logs for another target API.
How to use Codex Chat Transfer
Paste your chat log into the Input (JSON/Markdown) panel, or press Load Sample JSON to drop in a three-message example — the banner then reads 'Sample chat structure loaded into input box.'
The source format is worked out for you: a JSON array of messages, an object with a messages array, Markdown lines headed **User:**, **Assistant:** or **System:**, or unheaded plain text treated as one user turn. There is no source dropdown; malformed JSON that begins with [ or { shows a Failed to parse input message under the editor.
Choose the target on the tab row under Transpiled Output — OpenAI JSON, Anthropic JSON, Google Gemini, Cohere JSON, Llama 2/3 Prompt or Markdown Text — then press Copy, or Download to save it as chat-transfer-<format>-<timestamp>.json (.txt for Markdown Text and Llama 2/3 Prompt).
Why use Codex Chat Transfer
Six formats from one paste
Switch the output tab and the same conversation is re-emitted as OpenAI, Anthropic, Gemini, Cohere, Llama or Markdown.
Handles the awkward role mappings
Assistant becomes model for Gemini and CHATBOT for Cohere, and the system turn is moved or wrapped wherever each API expects it.
Reads Markdown transcripts too
Input does not have to be JSON — a log with **User:** and **Assistant:** headings is parsed back into structured messages.
Common use cases
- You have a working prompt as an OpenAI messages array and need the Anthropic shape, where the system prompt is hoisted into its own top-level system field instead of sitting in the array.
- You are moving an evaluation set to Gemini and need every assistant turn relabelled as role "model" with the text wrapped in parts, plus a systemInstruction block.
- A teammate pasted a chat transcript into a doc as Markdown, and you want it back as a valid JSON messages array you can drop into a test fixture.
Frequently asked questions
What formats can it convert between?
Six: OpenAI JSON, Anthropic JSON, Google Gemini, Cohere JSON, the Llama 2/3 prompt string, and Markdown text. Any of them can be the output; input is JSON (a messages array or an object containing one) or a Markdown transcript.
Link to answerHow does it handle the system prompt?
It is repositioned to match each format. OpenAI keeps it as a message with role system, Anthropic moves it to a top-level system field beside messages, Gemini wraps it in systemInstruction, Cohere marks it SYSTEM in chat_history, and Llama wraps it in <<SYS>> tags inside the first [INST] block.
Link to answerCan it parse a chat log that is not JSON?
Yes. Recognised **User:**, **Assistant:**, **Bot:** and **System:** headings split Markdown into messages. Unheaded plain text is accepted as one user message; malformed JSON that begins with [ or { produces a parse error instead of falling back to text.
Link to answerWhat does the Llama output look like?
It produces the raw prompt string, not JSON: a system turn becomes <s>[INST] <<SYS>>…<</SYS>>, the user turn closes with [/INST], and each assistant reply ends with </s>. Downloads of the Llama and Markdown outputs are saved as .txt; the other four save as .json.
Link to answer