Prompt Formatter
Format a system + user prompt into the JSON shape LLM APIs expect.
What is the Prompt Formatter?
Most LLM APIs expect a prompt structured as a list of role-tagged messages (a "system" message plus one or more "user"/"assistant" turns) rather than a single block of text. This tool takes a system prompt and a user message and formats them into that structure, or into a simple XML-tagged single-string format some workflows prefer.
How to use it
- Type your system prompt (optional) and user message.
- Pick whether you want a JSON messages array or an XML-tagged single string.
- Copy the result directly into your API request or prompt template.
The JSON messages format matches the general shape used across most current chat-completion style LLM APIs (a list of objects with "role" and "content"); exact field names can vary slightly by provider, so double-check against your specific API's documentation before relying on it in production code. Everything is generated locally in your browser — nothing you type is sent anywhere.