How to use XML tags in Claude prompts
Wrapping parts of your prompt in simple tags is one of the easiest ways to get more reliable answers from Claude. A practical guide with examples.
A translation that reads like it was written in the target language, with notes on the places where a literal version would have sounded off.
Translate this from [SOURCE LANGUAGE] into [TARGET LANGUAGE].
Who'll read it: [AUDIENCE, e.g. customers of an online shop, users of a mobile app]
Register: [e.g. informal and friendly, formal but warm, neutral]
Words that must stay as they are: [PRODUCT NAMES, BRAND TERMS, OR "none"]
<text>
[PASTE THE TEXT]
</text>
How I'd like you to work:
- Translate meaning and tone, not words. If a joke, idiom or cultural reference wouldn't land, replace it with something that does the same job, and tell me you did.
- Keep the formatting: headings, lists, line breaks, placeholders like {name}.
- Match the register I gave you. If the source is playful, the result should be playful in the target language, not stiff.
- Don't add or drop information.
After the translation, list the places where you deliberately moved away from a literal version, with the reason for each. Then flag anything you weren't sure about, so I can ask a native speaker.Votre commande est en route !
On a bien reçu votre paiement, et vos affaires sont déjà en train d'être emballées. Comptez 2 à 4 jours ouvrés pour la livraison.
Un petit conseil : si vous n'êtes pas chez vous, vous pouvez rediriger le colis vers un point relais depuis le lien de suivi. Ça évite le petit papier dans la boîte aux lettres.
Des questions ? Répondez simplement à cet e-mail, il y a un humain de l'autre côté.
L'équipe {shop_name}
NoteThis is an example. Results change between runs and model versions. Claude Prompts is a fan project and is not affiliated with Anthropic.
Customer emails, app copy, product descriptions, help articles, anything where tone does real work. It's not for contracts or medical text, where a literal translation and a professional's stamp matter more than natural flow.
Register is the big one. "Formal but warm" and "informal and friendly" produce different words, different sentence lengths and, in many languages, a different form of "you". Name your audience's country when it matters: French for France and French for Quebec aren't the same, and the prompt only knows what you tell it.
The list of deliberate changes is the part to read closely. It tells you where the translator made a judgment call, and those are exactly the lines to show a native speaker if you have one. If you don't, at least read the flagged items. They're the places where a small mistake would be most visible to your readers.
Use the copy button above. The full text is included, nothing is cut off.
Everything highlighted in yellow is a placeholder. Swap it for your own topic, audience or data.
If the result helped, press the heart. Votes decide which prompts make the weekly top 10.
Your voice, as I hear it: dry, a little self-mocking, short sentences that land on the last word. Edited version I ran my first 10K on Sunday. I would like to tell you it went well. It did not. I started too fast, because...
Paste a rough draft and get back a tighter version that still sounds like you, plus a short list of what changed and why.
Hi Dana, You ordered a medium and we sent you a large. That's on us, and I'm sorry you had to chase it. A medium is going out today by tracked post and should be with you by Thursday. You'll get the tracking number by email...
Paste the complaint and what really happened, and get a reply that deals with the problem in the first line, says what happens next and when, and skips the canned apology.
Wrapping parts of your prompt in simple tags is one of the easiest ways to get more reliable answers from Claude. A practical guide with examples.
None of these cause an error message. They just make every answer a little worse. Here is how to spot each one and what to write instead.