JSON to PDF API
Send JSON, choose a template, and let PDFox handle layout, tables, formatting, and delivery. No HTML string-building required.
Why this page exists
If your backend already produces structured JSON, a JSON to PDF API should let you keep that payload as the source of truth. You should not need to build HTML inside your application every time a document is requested.
PDFox turns structured JSON into PDFs through reusable templates. Arrays, nested objects, conditionals, totals, and formatted values are handled in the template layer so your application can stay focused on data, not document layout.
Explore next
Compare monthly PDF limits, webhooks, API access, and batch-friendly tiers.
Open page DocsReview authentication, generation, polling, downloads, and MCP setup.
Open page Use casesSee invoices, payslips, contracts, and delivery workflows built on PDFox.
Open page AISee how PDFox fits Claude, ChatGPT, and internal copilot workflows.
Open pageWhat PDFox gives you
The point is not only to accept JSON. It is to turn that JSON into repeatable, maintainable documents.
Render invoices, statements, letters, and reports from nested JSON structures with loops and conditional sections inside the template.
Published templates expose schema and sample payloads so engineers know what fields to send before generation starts.
Move pagination, tables, headers, assets, and styling out of your business logic and into a template workflow the team can manage.
Queue the job, retrieve its status, and fetch a signed download URL when the rendered PDF is complete.
REST API example
curl -X POST https://api.pdf-fox.com/generate \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"templateId": "tpl_account_statement",
"data": {
"customer": {
"name": "Northline Health",
"account_id": "AC-4421"
},
"statement": {
"period": "May 2026",
"opening_balance": 1420.00,
"closing_balance": 980.00
},
"entries": [
{ "date": "2026-05-01", "description": "Subscription", "amount": 320.00 },
{ "date": "2026-05-14", "description": "Credit note", "amount": -120.00 }
]
}
}' The template handles loops, conditional sections, totals, and formatting helpers. Your application only sends structured JSON.
How teams use it
PDFox is especially useful when the data model is reliable but the document layout changes often.
If the core payload already exists in your backend, PDFox lets you keep that payload and move rendering concerns into the template layer.
One customer payload can power invoices, statements, renewal letters, or confirmations through different templates.
JSON to PDF works best when engineering wants to remove HTML builders, print styles, and fragile document assembly logic from the app codebase.
If the payload is already structured, do not rebuild the document layer inside your application.