Online converter
HTML to PDF converter
Paste HTML, upload an .html file or enter the address of a public web page, then download the result as a PDF. Nothing to install, and no account is needed to try it.
- Three inputs: pasted HTML, an uploaded .html file, or a public URL
- Set the page width and height in pixels, plus landscape and background printing
- Building this into an app? Use the HTML to PDF API
How to convert HTML to PDF
Provide your HTML
Paste the markup, upload a single
.htmlfile, or enter a public page URL.Set the page
Choose a width and height in pixels, landscape orientation and whether background colors and images are printed.
Download the PDF
The page is rendered in a headless browser and returned as a PDF you can download or open in a new tab.
What the converter supports
Inline and embedded CSS
Styles in <style> tags and inline style attributes are applied, because the page is rendered by a browser engine.
Custom page size
Width and height are set in pixels. The sample above renders at 800 × 1100 px.
Backgrounds on or off
Print background colors and images, or switch them off for a plainer, lighter document.
Public pages by URL
Enter any publicly reachable http(s) address. Private networks and localhost are blocked for safety.
Limits to know about. Uploaded files must be a single self-contained .html file of up to 5 MB. External stylesheets, fonts and images must be reachable on the public internet. Pages behind a login are not supported. We do not claim that every HTML or CSS feature renders identically to your desktop browser, so test your own template.
Common problems and fixes
| Problem | Likely cause | What to try |
|---|---|---|
| Styles are missing | CSS is linked from a file path that is not public | Inline the CSS in a <style> tag, or link to a stylesheet on a public URL. |
| Images are broken | Image URLs are relative, or are only reachable on your machine | Use absolute public URLs, or embed small images as data: URIs. |
| Background colors are missing | Background printing is off | Tick “Print background colors and images”. |
| Content is cut off or too small | Width is narrower than the layout | Increase the width in pixels so your layout fits without wrapping. |
| “Invalid HTML content” | The pasted text has no HTML tags | Make sure the input contains markup such as <h1>, or use the URL tab for a web address. |
| URL is rejected | It points to localhost, a private network or a non-web port | Use a public http(s) address on port 80 or 443. |
HTML to PDF converter FAQ
Is the HTML to PDF converter free?
Yes. You can convert with the web converter without registering. The API has a free plan with 10 conversions per day, and a Premium plan at $5 per month.
Do I need to create an account?
No account is needed to use the web converter on this page. An API key is only needed to call the API from your own code.
What is the maximum file size?
Uploaded .html files can be up to 5 MB.
Can I convert a web page instead of HTML?
Yes. Use the Web page URL tab with a public http or https address. Pages that require a login are not supported.
Is JavaScript executed?
The page is rendered in a headless browser, but we have not documented JavaScript behaviour in detail. If your page depends on scripts, test it with a sample before relying on it.
How do I automate this?
Use the HTML to PDF API, which accepts the same inputs from your server code. See the language guides for PHP, Laravel, Node.js and Python.
Convert your HTML now
Paste, upload or enter a URL above and get a PDF in seconds. Need it in your app? Get an API key.