Toolstia / chat to JSON converter
Chat to JSON converter
Developers often need a conversation in the messages format that chat APIs expect. Paste a chat with labels and get a JSON array of role and content objects, or JSON Lines for fine-tuning data.
Roles are set to user, assistant or system, the format used by most chat APIs.
How it works
- Paste the chat.
- Choose a JSON array or JSON Lines.
- Copy the JSON.
The output
Each message becomes an object with a role, which is user, assistant or system, and the content text.
JSON Lines
JSON Lines puts one message object on each line, a format used for training data and logs.
Labels
Start each message with User:, Assistant:, System:, You said: or ChatGPT said:. Multi-line messages are kept together.
Escaping
Quotes and line breaks are escaped for you, so the JSON is valid.
Questions
Can it make a full training file?
It converts one conversation. Combine several conversations by adding the results together.
Does it call an AI?
No. It only reformats text you paste.
Is my chat uploaded?
Everything happens in your browser, and nothing you paste is sent anywhere.