Prompt Formatter
Arrange the parts of a prompt into labeled sections in Markdown, XML tags or plain labels, or tidy the whitespace of an existing prompt, without changing its wording.
Loading the tool…
Example#
With the task "Summarize" and the constraints "Max 3 bullets" and "Plain English", the Markdown style produces:
## Task
Summarize
## Constraints
- Max 3 bullets
- Plain EnglishThe XML style produces the same content inside <task> and <constraints> tags.
How it works#
In build mode you fill in optional sections: role, task, context, input, constraints, output format and examples. Only the task is required. The tool always lists sections in that fixed order, leaves out empty ones and puts each constraint on its own line. You pick one of three styles: Markdown headings, XML tags or plain labels.
The whitespace tidy normalizes line endings, removes trailing spaces, collapses runs of blank lines and trims each section. Code fences inside a section are left exactly as written. An optional setting turns curly quotes into straight ones. The wording of your prompt is never changed, added to or reordered inside a section. Tidy mode applies the same cleanup to a single prompt that is already written.
Assumptions#
- The prompt is at most 200,000 characters in total.
- The token figure is an estimate of characters divided by four. For exact counts, use the Token Calculator.
Use cases#
- Turning a long free-form request into sections that are easier to maintain.
- Comparing how the same prompt reads as Markdown and as XML tags.
- Cleaning pasted prompts that carry stray spaces and blank lines.
- Keeping prompts in a repository consistent.
Limitations#
Formatting can make a prompt easier to read and maintain. It does not make a model's answer more accurate, and it does not guarantee that a model follows the structure. Which style works best depends on the model and on the provider's own guidance. XML output is not escaped; the tool warns when a section contains its own closing tag. Everything runs in your browser and your prompt is not sent anywhere.