Convert HTML to PDF with Full CSS Support
Transform any HTML content into pixel-perfect PDFs. Support for custom CSS, Google Fonts, headers, footers, and page configuration. Send raw HTML, upload files, or provide a URL.
# Convert HTML to PDF
curl -X POST \
https://api.convertfilefast.com/v2/convert/html-to-pdf \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "<html><body><h1>Invoice #1234</h1><p>Total: $99.00</p></body></html>",
"css": "body { font-family: Inter, sans-serif; }",
"options": {"page_size": "A4", "orientation": "portrait"}
}' \
--output invoice.pdf
# HTTP 200 OK — Content-Type: application/pdfAdvantages
Why use our API?
Complete and reliable solution for integration in any tech stack.
Full CSS Support
Renders CSS3, Flexbox, Grid, Google Fonts, and custom stylesheets exactly as designed.
Multiple Input Methods
Send raw HTML string, upload .html file, or provide a public URL to convert.
Custom Page Settings
Configure page size (A4, Letter, A3), orientation, and margins per request.
Headers & Footers
Add recurring headers and footers to every page using CSS Paged Media.
Base64 Image Embedding
Embed logos and images as base64 data URIs for guaranteed rendering.
Production Ready
99.9% uptime, sub-second conversion, auto-scaling infrastructure.
Start Converting HTML to PDF
Get your API key and convert your first HTML document in under a minute. Free plan includes 10 conversions per month.
No credit card. 10 free conversions on Free plan.