What Is a Prompt Formatter?
LLM APIs expect prompts as structured JSON with a list of role/content message pairs, not as one long string. Building that structure by hand is error-prone — especially with multi-turn few-shot examples and reusable variables. This tool builds the structure visually, tracks your placeholder variables, and exports an API-ready payload for whichever provider you're calling.
OpenAI vs Anthropic Prompt Format
OpenAI's Chat Completions API puts every message — including the system prompt — into a single messages array with {role, content} entries. Anthropic's Messages API separates the system instructions into a top-level system field, and the messages array only contains user and assistant turns. Switch export formats in the panel above to see the same conversation reshaped for each provider — no manual rewriting.
Using Variables in Prompts
Anywhere in a message, type {{name}} to declare a placeholder — it appears in the Variables panel on the right automatically. Set its value once and the same substitution happens across every message and every export format. Reuse variables across templates (say {{language}} in a code-review prompt and {{topic}} in a translation prompt) to keep your prompt library DRY.
Prompt Engineering Tips
- Put your most important instructions in the system message — modern models attend to it most strongly.
- Use few-shot examples (paired user → assistant turns) to demonstrate the exact output format you want, rather than describing it in prose.
- Be explicit about output format: "Respond in JSON matching this schema" beats "please format nicely."
- Verify your prompt fits the context window with the Token Counter before shipping — a 200K-token payload in a 128K-context model silently truncates.
- Keep system prompts under ~500 tokens for cost efficiency; move detailed instructions into the user message and consider prompt caching for anything larger that runs on every request.
Privacy
Your prompts stay in your browser. Nothing is sent to any server or LLM API — the tool never dials outbound. The cURL export includes a YOUR_API_KEY placeholder that you replace locally when you actually run the command.