HCODX/System Prompt Formatter
100% browser-based · Structured sections · Ready to paste

System Prompt Formatter

Format a system prompt into clearly delimited sections (role, context, instructions, format, examples). Output as Markdown or XML-style tags — whichever your LLM likes best.

Draft prompt
Formatted prompt
Format options
Extract from chat log
Input size
0
Output size
0
Sections
0
Status
Ready
Example

Draft in, structured out

Mark sections with # headings. The formatter recognizes them and emits clean structure in the style you pick — markdown, XML tags, ALL-CAPS labels, or plain dashes.

Draft
# Role
You are a helpful technical writer.

# Instructions
Be concise and accurate.
XML output
<role>
You are a helpful technical writer.
</role>

<instructions>
Be concise and accurate.
</instructions>
Use cases

What you'll use this for

Anywhere a system prompt has gotten organic and messy and needs to be tightened into a structured layout.

Scaffolding new prompts

Start from a rough draft, click Format, get a clean section-by-section template.

Sharing prompts

Structured prompts are easier to skim, review, and discuss with teammates.

Prompt libraries

Normalize prompts to a consistent style before storing them in your library.

Ablation tests

Compare model behavior with markdown vs XML vs ALL-CAPS formatting.

Step by step

How to format a system prompt

1

Write a draft

Use # markers to denote section headings: # Role, # Context, etc.

2

Pick an output style

Markdown for human review, XML tags for Claude, ALL-CAPS labels for a no-frills look, dashes for legacy systems.

3

Click Format

Auto-format is on by default. Section count appears in the stats bar.

4

Copy and ship

Paste into your LLM call, prompt library, or repo.

FAQ

Frequently asked questions

Anthropic's Claude family is documented to follow XML-style tags (e.g. <instructions>...</instructions>) well. OpenAI's GPT family handles them but often works equally well with markdown headings. When in doubt, try both styles and compare outputs.

Yes. Runs entirely in your browser. No signup, no limits.

Yes. Any text after a leading # becomes a section title — # Persona, # Guardrails, # Refusal rules, anything. The formatter reformats it into the chosen output style.

If you have an existing chat log with a system message, use the System Prompt Extractor to pull it out, then re-format it here.

If your draft has content before the first # heading, it's collected under a synthetic section called Preamble. Move that content under an explicit heading for clearer output.

About

About system prompt structure

A well-structured system prompt makes intent legible to both the model and the next human who reads it. Standard sections include role (who is the model), context (what's the setting), instructions (what to do), output format (how to format the response), and examples (input/output demonstrations).

When to pick which style

  • Markdown — human-readable, version-control friendly, works with most models.
  • XML tags — recommended by Anthropic for Claude; clear hierarchical structure.
  • ALL-CAPS labels — terse, ASCII-only, useful for legacy integrations.
  • Plain dashes — minimal markup, useful when you want sections without taking on a structured syntax.

Tips

  • Keep sections short and atomic — one concern per section.
  • Put the most important instructions first; many models attend more to early tokens.
  • Use examples generously — concrete few-shot demonstrations outperform abstract rules.
Related

Related tools