Skip to content
cosmodev ~/tools/chat-format-converter

Tagapag-convert ng Chat Format

AI & Agents

I-convert ang chat transcripts sa pagitan ng OpenAI messages[], Anthropic system+messages, Gemini contents[], at plain Markdown. Ang mga role ay tapat na namamalik, ang tool calls ay pinapanatili kung maaari, at ang anumang hindi na-mapapa ay minamarkahan — hindi kailanman tahimik na tinatanggal. Tumatakbo nang buo sa iyong browser.

Output
I-paste ang isang transcript para i-convert ito.

(Nasa Ingles ang dokumentasyon)

What it does

The Chat Format Converter turns one chat transcript into another provider’s shape: OpenAI messages[], Anthropic messages[] with a top-level system, Gemini contents[] (where the assistant is model), or a plain Markdown transcript. Paste a transcript, pick the source and target formats, and get the equivalent payload ready for the other API. Everything runs 100% client-side — nothing you paste is ever sent to a server, so it is safe for real logs and payloads.

Conversion goes through a shared internal message list, so roles map faithfully (system becomes Anthropic’s top-level system and Gemini’s systemInstruction; Gemini’s model becomes assistant) and tool calls, tool results, and their correlation ids are preserved across formats. Fields a target format cannot represent (tool calls in Markdown, per-message names in Anthropic/Gemini) are flagged as warnings instead of being dropped silently, and an OpenAI → OpenAI round trip is lossless.

How to use it

  1. Paste your transcript into the Transcript box (or hit Sample to load a demo conversation).
  2. Pick the source format under From and the target under To — or press the swap button between them to reverse the direction.
  3. Read the converted transcript in Output; press Copy output to copy it.
  4. Check Warnings (shown only when present) for anything that could not be mapped, such as tool calls on the way to Markdown.
  5. Copy share link encodes the transcript and both formats in the URL, so a link reproduces the exact conversion.

Examples

OpenAI → Anthropic (system moves to the top level)

Input:

{
  "messages": [
    { "role": "system", "content": "You are terse." },
    { "role": "user", "content": "Hi" },
    { "role": "assistant", "content": "Hello." }
  ]
}

Output:

{
  "system": "You are terse.",
  "messages": [
    { "role": "user", "content": "Hi" },
    { "role": "assistant", "content": "Hello." }
  ]
}

OpenAI → Gemini (assistant becomes model, system becomes systemInstruction)

Output:

{
  "systemInstruction": { "parts": [{ "text": "You are terse." }] },
  "contents": [
    { "role": "user", "parts": [{ "text": "Hi" }] },
    { "role": "model", "parts": [{ "text": "Hello." }] }
  ]
}

OpenAI → Markdown (a tool-using turn — tool calls are flagged, not lost)

An assistant message carrying tool_calls converts to **assistant**: / **tool**: blocks and reports message 0: tool calls are not representable in Markdown and were dropped so you know exactly what did not survive the trip.

Good to know

  • Tool plumbing survives JSON formats: OpenAI tool_calls ↔ Anthropic tool_use/tool_result blocks ↔ Gemini functionCall/functionResponse parts, with ids (or Gemini names) kept as the correlation key.
  • Lossless same-format round trip: converting OpenAI → OpenAI parses into the internal shape and back without changing string-content messages.
  • Shareable: the transcript and both formats are encoded in the URL (?t=…&from=…&to=…).
  • Private: all parsing happens locally — safe for real logs, prompts, and credentials.
  • Related tools: Token Estimator, LLM Cost Calculator, JSON Formatter.
Source code14 wika

100% sa client side · hindi kailanman lumalabas ang data mo sa browser mo. Nakatulong ba? I-share ito sa isang kasamahan.