Quick start
-
Paste JSON
Root array with role and string content per item.
-
Switch output
JSON mode prettifies; text mode shows role sections.
Paste an OpenAI chat messages array, validate roles and content, then output pretty JSON or readable plain text for API debugging.
Read the full guide: The Complete Guide to OpenAI Message Formatting & LLM Data Processing β
Privacy: processed locally, never uploaded.
β Paste in the input area below to see results instantly
Validate OpenAI messages JSON and output pretty JSON or readable plain text.
This tool validates and prettifies OpenAI messages; Chat Format Converter exports Anthropic / Gemini shapes.
Paste an OpenAI chat messages array, validate roles and content, then output pretty JSON or readable plain text for API debugging.
Paste JSON
Root array with role and string content per item.
Switch output
JSON mode prettifies; text mode shows role sections.
system, user, assistant, developer; content must be a string.
When debugging OpenAI API conversations, developers often need to inspect the messages array structure. Simply copy-paste the messages object from API requests into this tool to automatically validate role/content fields and output formatted JSON. For long conversations, switch to plain-text mode for quick context reading.
The tool is ideal for testing complex conversation flows. For multi-turn dialogues, use it to check if historical messages contain invalid roles or truncated content. The indented JSON can be directly copied back to code editors, more efficient than viewing compressed text in terminals.
Input
[{"role":"user","content":"Hi"}] Output
Pretty JSON or plain text
This validates OpenAI messages; Chat Format Converter exports Anthropic/Gemini shapes.
Common causes: 1) Invalid role (not system/user/assistant) 2) Missing content field 3) Missing outer square brackets 4) Contains JavaScript comments. Click error messages to highlight problematic lines β fix and re-paste.