Free tool

HTML to PDF converter

Paste HTML or open a file, choose the page size, and download the PDF. Free, no signup.

Free, no signup, no watermark. Inline CSS and embedded images print; remote files and scripts do not.

This free HTML to PDF converter prints your HTML with headless Chromium, the browser engine behind the ASHDOCS HTML to PDF API, so CSS layout, web fonts embedded as data URIs, tables and print rules such as page breaks render the way they do in Chrome's print preview.

Chromium print engine

Flexbox, grid, @page size and margins, and page-break rules print as Chrome prints them.

Safe by design

The free converter renders with the network and JavaScript turned off: inline CSS and data: images print, remote files and scripts do not.

A4 or Letter, portrait or landscape

Pick the paper and orientation; a CSS @page size in your HTML takes priority.

For developers: HTML to PDF from the API

The API version loads remote images, stylesheets and fonts, renders URLs as well as HTML and returns a signed link to the file.

POST /api/v1/tools/html-to-pdf
curl -X POST https://www.ashdocs.com/api/v1/tools/html-to-pdf \
  -H "X-API-Key: ash_test_..." \
  -F 'options={"html":"<h1>Invoice 42</h1><p>Total due: 120.00 USD</p>"}'
Response
{
  "job_id": "job_8c1f2e7a9b3d",
  "request_id": "req_5d0a4c9e1f27",
  "tool_key": "html-to-pdf",
  "status": "completed",
  "output_files": [
    {
      "filename": "output.pdf",
      "size": 8214,
      "url": "<signed URL, valid for 1 hour>",
      "expires_at": "2026-10-09T13:00:00+00:00"
    }
  ],
  "credits_consumed": 0,
  "is_test": true
}

Response trimmed; values illustrative. Test keys report 0 credits; a live key reports 1. The PHP, Java, C#, Ruby and Go tabs send the same request as JSON and read the key from ASHDOCS_API_KEY.

How to use the HTML to PDF converter

Paste a full HTML document or a fragment into the box, or open an .html file. Choose A4 or Letter and, if you need it, landscape. Select Convert to PDF and the file downloads as document.pdf.

Getting the PDF to look right

Most HTML that looks right in Chrome prints right here. A few things help:

  • Put styles in a <style> block or inline; linked stylesheets are not fetched in the free converter.
  • Embed images and fonts as data URIs for the same reason.
  • Use @page { size: A4; margin: 20mm; } to control the page box, and break-before: page to start a new page.
  • Background colors and images print, so there is no need for print-specific overrides.

Free, and what needs an API key

The HTML to PDF converter on this page is free with no signup and no watermark, up to 20 PDFs a day from one connection and 2 MB per document. For more, or to render from your own code, the same conversion is one API call; the free plan includes 10 credits a month and test keys never use credits.

What you paste is sent to ASHDOCS only to print the PDF and is not stored. Each PDF made is logged with the IP address, browser and file size for 30 days, to stop abuse of the free tool.

Frequently asked questions

Is the HTML to PDF converter free?

Yes, with no signup and no watermark, up to 20 PDFs a day from one connection and 2 MB per document.

Why are my images missing?

The free converter does not fetch anything from the internet. Embed images as data URIs, or use the API, which loads remote images and stylesheets.

Does JavaScript run?

Not in the free converter. Render the page's final HTML, or use the API for URLs and pages that need scripts.

Can I convert a web page by URL?

URL to PDF needs an API key: the API's URL to PDF tool loads the page in Chromium and prints it.

Guide: Why Your HTML to PDF Layout Breaks (and How to Fix It)