A prompt formatter that finds the parts and lays them out
This prompt formatter takes the prompt you typed in a hurry — one long paragraph, mixed bullet symbols, a format note at the end — and rebuilds it as clear sections: Role, Task, Context, Audience, Constraints, Examples and Output format. Choose Markdown headings, XML tags, plain labels or a JSON array of chat messages, and see exactly what changed in the before-and-after view.
It works by rules, not by AI, so the same prompt always gives the same result and nothing leaves your browser. It never rewrites your instructions; to sharpen the wording itself, use the prompt optimizer.
How to format a prompt
- Paste your prompt into Your prompt — plain text, Markdown, XML tags or a JSON message array.
- Pick an Output style: Markdown headings, XML tags, Plain labels or JSON messages.
- Keep the standard section order or choose As written.
- Check Parts found; if something landed in the wrong section, add a label such as “Rules:” or “Context:” in your prompt.
- Switch to Changes to review the edits, then Copy or Download.
Prompt Formatter features
Reads any layout
Labels (“Task:”), Markdown headings, XML tags and JSON message arrays are recognised before the sentence rules run.
Sentence-level rules
“You are…” is a role, “Respond in JSON…” is an output format, “Don’t…” and “Keep it…” are constraints, imperatives are the task.
Clean lists
•, *, ▪, ✓ and other bullets become “- ”; “1)”, “(2)” and “a.” become a clean 1., 2., 3. list.
Code and data fenced
Unfenced JSON, CSV and code are detected and put in fenced blocks tagged with the language.
Variables preserved
{{city}}-style placeholders are protected from every tidy-up step, in every output style.
Diff view
Added and removed lines are highlighted so you can see every change before you use the result.
Which output style should you use?
Google’s Gemini prompting guide also recommends clear delimiters, XML-style or Markdown. Guidance checked 14 October 2026; none of the vendors require a particular style, so pick the one your team will maintain.
| Style | Best for | Vendor guidance |
|---|---|---|
| Markdown headings | ChatGPT, most chat apps, prompts you will read again | OpenAI’s prompt engineering guide suggests Markdown headers and lists to mark sections and hierarchy |
| XML tags | Claude, prompts that mix instructions with long documents | Anthropic: XML tags help Claude parse prompts that mix instructions, context and examples; it uses tags like <instructions> and <context> |
| Plain labels | Simple prompts, tools that strip formatting | Readable anywhere |
| JSON messages | API calls and test harnesses | Role and rules go in the system (or developer) message, the task and context in the user message |
How the parts are detected
Labels you wrote yourself win: “Rules:”, “## Output format” or “<context>” put their content straight into that section, and over 60 common synonyms are understood (Background, Requirements, Persona, Deliverable…). Free text is split into sentences, and each sentence is checked in a fixed order: role phrases, example phrases, output-format requests (respond, return, format… plus a format word such as JSON, table or bullet points), audience statements, constraints (never, don’t, only, always, keep it, make sure, must…), task requests (an imperative verb, or “Can you…” and “I want you to…”), and everything else becomes context. “As a recruiter, review my CV” is split into a role and a task.
A bulleted list takes its section from the line that introduces it (“Rules:”), or from what most of its items look like. JSON objects, comma-separated tables and code are fenced so the model sees exactly where data starts and ends.
Worked example
The example prompt — a lower-case paragraph, three different bullet symbols and two notes at the end — comes out like this in Markdown:
## Role
You are an experienced travel writer.
## Task
I want you to write a 3-day itinerary for {{city}} for a family with two kids.
## Context
We're going in december and we don't like museums much.
## Constraints
- Keep it under 300 words
- Include one rainy-day option per day
- Don't include restaurants we'd need to book
## Examples
Day 1 | Old town walk | Zoo | Night market
## Output format
A markdown table with columns Day, Morning, Afternoon, Evening.“December” keeps its lower-case d: the formatter fixes only sentence starts and the word “I”, never spelling or meaning. Count the result with the LLM token counter, or build a prompt from a form with the AI prompt generator.
Prompt Formatter FAQ
What does a prompt formatter do?
It reorganises a prompt into labelled sections, normalises lists and spacing, and fences code and data, without changing what you asked for. This prompt formatter shows the result and a line-by-line diff.
Does it change my wording?
Only a little, and only if “Tidy sentences” is on: extra spaces are removed, sentences start with a capital letter, a lone “i” becomes “I”, and prose sentences get a full stop. Turn it off to keep your text exactly.
Should I use XML tags or Markdown?
Both work with current models. Anthropic recommends XML tags for Claude when a prompt mixes instructions with documents; OpenAI’s guide uses Markdown headings and XML for reference material. Use whichever your team finds easiest to read and edit.
Are my {{variables}} safe?
Yes. Placeholders in double curly braces are protected during tidying and appear unchanged in every style, including inside JSON strings.
Why did a sentence end up in the wrong section?
The rules look at how each sentence starts. Add a label line such as “Context:” or “Rules:” before that part, and the formatter will follow your label.
Is my prompt sent to an AI?
No. The formatter is a set of rules running in your browser; nothing is uploaded.