0Pricing
AI Prompt Engineering · Lesson

Plain Text vs Formatted Output

When to request clean plain text vs rich markdown output.

The Plain Text Case

Markdown formatting is powerful — but it is not always the right choice. Many real-world applications need clean, unformatted text where markdown symbols would appear as literal characters rather than rendered formatting.

Knowing when to ask for plain text is as important as knowing how to ask for rich formatting.

When Plain Text Is Required

Use plain text output when your environment does not render markdown:

  • Email copy: most email clients show raw asterisks
  • SMS and push notifications: no formatting support
  • Voice output: text-to-speech reads '** bold **' literally
  • CRM and help desk fields: many do not render markdown
  • API data processing: when the text will be stored or further processed
  • Legacy system input fields: plain text only
import anthropic

client = anthropic.Anthropic(api_key='sk-ant-your-key-here')

response = client.messages.create(
    model='claude-opus-4-5',
    max_tokens=200,
    messages=[{
        'role': 'user',
        'content': (
            'Write a 120-character push notification for a flash sale ending in 2 hours. '
            'Plain text only — no emojis, no markdown, no asterisks, no special characters. '
            'Must include: urgency, discount percentage (30%), and category (electronics). '
            'Output the notification text only — nothing else.'
        )
    }]
)
print(response.content[0].text)

All lessons in this course

  1. Requesting Lists and Bullet Points
  2. Asking for Tables and Structured Data
  3. Markdown Formatting in Prompts
  4. Plain Text vs Formatted Output
← Back to AI Prompt Engineering