EML to PDF API – Convert Emails to Court-Ready PDFs
Turn any EML file into a court-ready PDF in seconds. Preserve headers, body text, and attachments with perfect formatting.
curl -X POST "https://api.xspdf.com/v1/convert/eml-to-pdf" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input_url": "https://files.example.com/email.eml",
"options": {
"include_attachments": true,
"include_headers": true,
"format": "A4"
}
}' Email Archiving Is Broken
Legal Discovery Nightmares
Lawyers need email evidence in PDF format. EML files aren't court-admissible. Manual conversion loses metadata. Headers get stripped. Attachments disappear.
Compliance Bottlenecks
GDPR, HIPAA, and SOX require email archiving. Thousands of EML files need PDF conversion for long-term storage. Manual export takes days.
Tool Complexity
Python email.parser is brittle. Outlook PST export breaks formatting. Thunderbird plugins are unreliable. Every tool produces different output.
Hidden Cost
Legal teams waste hours manually converting emails. Compliance officers pay thousands for enterprise archiving software. Developers build custom parsers that break when email formats change. Critical evidence gets lost in format conversion.
Upload EML. Get Court-Ready PDF.
Upload EML File
Pass a URL or base64-encoded EML file. We parse MIME structure, extract headers, body, and attachments automatically.
Configure Output
Choose to include full headers, attachments list, and body formatting. Optionally embed attachment previews inline.
Get Archival PDF
Receive a PDF with sender, recipient, timestamp, subject, full headers, body text, and attachment references. Ready for legal discovery.
response = requests.post(
"https://api.xspdf.com/v1/convert/eml-to-pdf",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"input_url": "https://files.example.com/email.eml",
"options": {"include_attachments": True, "include_headers": True}
}
)
pdf_url = response.json()["output_url"] Complete Email Preservation
Full Header Preservation
Captures From, To, CC, BCC, Date, Subject, Message-ID, and authentication headers. Shows complete email routing path for forensic analysis.
Attachment Handling
Lists all attachments with filenames and sizes. Optionally embeds attachment previews. Maintains chain of custody for evidence.
HTML & Plain Text
Renders HTML emails perfectly. Falls back to plain text when needed. Preserves formatting, links, and inline images.
Legal Standards
Output meets eDiscovery requirements. Includes timestamp authentication. Maintains metadata integrity. Accepted in court proceedings.
Fast Batch Processing
440ms median conversion time. Process thousands of archived emails per hour. Perfect for compliance exports and legal discovery.
MIME Standard Support
Parses complex MIME multipart messages. Handles nested attachments. Supports all standard email encodings and character sets.
Frequently Asked Questions
Are the PDFs admissible in court?
Our PDFs preserve all email metadata including headers, timestamps, and authentication information required for legal proceedings. However, admissibility depends on your jurisdiction's rules of evidence. Consult your legal team.
How are attachments handled?
By default, we list attachment filenames and sizes in the PDF. Set include_attachments: true to embed attachment previews. Large attachments are referenced with download links to avoid massive PDFs.
Can you convert HTML emails with images?
Yes. We render HTML emails with full CSS and image support. Inline images are embedded. External images are fetched and included. Output matches what you see in your email client.
What email headers are preserved?
All standard headers: From, To, CC, BCC, Date, Subject, Message-ID, Reply-To, In-Reply-To, References. Also includes authentication headers: SPF, DKIM, DMARC results. Set include_headers: true for full headers.
What's the maximum email size?
Standard plans support EML files up to 25MB. Enterprise plans support up to 100MB. Typical emails are 50-500KB. Large emails with many attachments can be 10-20MB.
Archive Your First Email in Under 5 Minutes
Join 8,700+ teams using xspdf for legal discovery and compliance. Free API key. No credit card required.
Related APIs