This free Claude prompt generator turns a few plain answers (what you want, why you want it, and what a good answer looks like) into a structured prompt that follows Anthropic’s own prompting best practices. It wraps your documents, examples and instructions in XML tags, puts long material first, and gives you three versions: one prompt to paste into Claude, a system prompt plus user message, and a ready-made Messages API request.
It runs in your browser with no AI call, so it’s instant, free and private. Nothing you type is sent anywhere.
Free prompt builder
Build a better Claude prompt with XML tags
Fill in what you know. The builder turns it into a clean, structured prompt that follows Anthropic's own prompting advice: a clear task, the reason behind it, examples and documents in their own XML tags, and long documents first. Copy it into Claude, a Project or your code.
Start from an example
10 more templates (free with your email, below the builder)
The basics
Material
The answer you want
Prompt check
Unlock 10 ready-made prompt templates
Meeting notes to action items, answering questions from a handbook, a sales follow-up, sorting feedback into themes and 6 more, each pre-filled in the builder so you only add your details.
Unlocked: the 10 templates are live in the builder above. You are also on the weekly HOW TO // AI newsletter.
Free. You also get the HOW TO // AI newsletter once a week. Unsubscribe any time.
Next: count its tokens, polish a rough prompt with AI or set up a Claude API key.
Built on Anthropic's prompting best practices (XML tags, examples, roles, long context and format control) and guide to reducing hallucinations, checked October 18, 2026. Everything runs in your browser; nothing you type is sent anywhere. Token counts are estimates (about 4 characters per token, and about 30% more on newer Claude models).
How to use the Claude prompt generator
- Pick an example to see what a strong prompt looks like, or start with the task box.
- Add context: why you need this and who it’s for.
- Paste any documents, and a few examples of the output you want.
- Choose the format, length and tone, and add any rules, one per line.
- Copy the version you need, and fix anything the prompt check flags.
What the generator does, and why
Every choice in the builder comes from Anthropic’s prompting guide:
| Builder step | Anthropic’s advice |
|---|---|
| Task box, and the “be more specific” check | Be clear and direct. Treat Claude like a brilliant new employee who lacks context, and say exactly what output you want. |
| Context box | Explain why an instruction matters. Claude generalizes from the reason. |
| Role | Setting a role in the system prompt focuses Claude’s behavior and tone. Even one sentence helps. |
| Examples, each in its own <example> tag | Examples are one of the most reliable ways to steer format and tone. Use 3 to 5 relevant, varied ones. |
| Documents at the top, inside <documents> | For long inputs, put the documents above the instructions and the question. |
| Quote-first option | For long documents, ask Claude to pull out the relevant quotes before it does the task. |
| “Say when it doesn’t know” option | Giving Claude permission to admit uncertainty reduces made-up answers. |
Why XML tags work so well with Claude
Anthropic’s docs say XML tags help Claude parse complex prompts unambiguously, especially when a prompt mixes instructions, context, examples and variable inputs. Wrapping each kind of content in its own tag, such as <instructions>, <context> or <documents>, keeps Claude from mistaking an example for an instruction or a document for your request.
Two habits make tags work better: use the same descriptive tag names every time, and nest tags when content has a natural hierarchy, like each document inside its own <document> tag with a <source> line. The generator does both for you.
Tips for better Claude prompts
- Say what to do, not what not to do. “Write in flowing paragraphs” works better than “Don’t use bullet points”.
- Give the reason. “This will be read aloud, so avoid abbreviations” beats a bare rule.
- Leave placeholders for reuse. Leave a document’s text blank and the generator inserts a placeholder such as {{REPORT}}, ready for a template or your code.
- Need strict JSON from the API? Ask for it in the prompt, and use Anthropic’s Structured Outputs feature when it must match a schema every time.
- Keep a long prompt lean. Every word costs tokens on every send. Check yours with the AI token calculator.
Have a rough prompt already and want AI to rewrite it for you? Try our AI prompt improver.
Related on HOW TO // AI
- The complete guide to AI prompting: the basics, for people who aren’t engineers.
- 50 copy-paste AI prompts for work: ready-made prompts for everyday tasks.
- How to use Claude: a step-by-step guide for beginners.
- Prompt engineering certifications: the real options, honestly compared.
Checked against Anthropic’s prompting best practices and its guide to reducing hallucinations on October 18, 2026.
Frequently asked questions
Does Claude really work better with XML tags?
Anthropic's own docs recommend them. Tags help Claude tell instructions, context, examples and documents apart, which reduces misreadings in longer prompts. Short, simple requests work fine without them.
What XML tags should I use in a Claude prompt?
Use clear, descriptive names and keep them consistent, such as instructions, context, examples and documents. Anthropic suggests nesting each document inside a documents tag with its own source and content.
Where should I put long documents in a Claude prompt?
At the top, above your instructions, examples and question. Anthropic says putting long material first and the question at the end improves results, especially with several documents.
Is this Claude prompt generator free?
Yes. It runs entirely in your browser with no AI call and no sign-up. An optional email unlocks 10 extra ready-made templates.
Can I use these prompts with ChatGPT or Gemini?
Yes. Structured, specific prompts with context and examples help any model. The tag layout follows Anthropic's advice for Claude, but other models read it fine too.
