Converts a single self-contained HTML file (inline CSS, base64 images) into a PDF — external links and scripts are not fetched.
Introduction
HTML is meant to be read by a browser, not carried around as a finished document — the same page can render differently depending on window size, installed fonts, and whether linked stylesheets or scripts actually load. A PDF, by contrast, is a fixed snapshot: the same layout on every device, with no dependency on a browser being present at all. Converting HTML to PDF trades that live, browser-dependent rendering for something you can hand to someone else with confidence it'll look the same — the trade-off is real, though, because a browser-rendered page and a converted PDF are not built by the same engine, and not everything a browser does gets carried over.
How the Conversion Works
This tool reads your uploaded file's HTML and inline CSS directly and lays it out as a PDF page. It accepts .html or .htm files up to 10 MB, and the file has to be a real HTML document — it's rejected unless it starts with a <!DOCTYPE html> declaration or an <html> tag, so a bare snippet of markup without that wrapper won't convert.
What Shows Up in the PDF, and What Doesn't
The most important thing to know before using this tool: only content that's actually inside the uploaded HTML file gets converted. Images, stylesheets, or fonts loaded from a web address (an http:// or https:// link) are not fetched — the conversion runs without internet access to your linked resources. And because you upload a single HTML file with nothing else, a local image referenced by a relative path (like src="photo.jpg", pointing at a file that lived in the same folder on your own computer) has nothing to resolve against on the server either — that file never made the trip. What does convert reliably is anything self-contained in the file itself: text, inline <style> blocks, inline style attributes, and images embedded directly as base64 data (a data:image/png;base64,... source instead of a file path or URL). If your HTML page has embedded images or external stylesheets, embedding the CSS inline and converting images to base64 before uploading is the reliable way to get them into the PDF.
The conversion also doesn't run any JavaScript in the page — it builds a static layout from HTML and CSS; it isn't a browser and has no script engine behind it. Anything on the page that depends on JavaScript to appear (content injected after page load, interactive elements, dynamically-styled sections) won't be in the output.
After the Conversion
The result shows whether the PDF came out smaller or larger than your original HTML file, labeled as compression or expansion. A plain HTML file with only text and inline styling typically converts to a similarly small PDF; a file with large embedded base64 images can expand somewhat, since the encoded image data becomes part of the PDF's own content stream.
What to Check Before You Submit the Result
- Linked images and stylesheets won't appear. As covered above, only inline CSS and base64-embedded images survive the conversion — anything loaded from a URL or a relative local path is silently missing from the PDF, with no error shown.
- Modern CSS layout has limited support. Standard block, inline, and table layout work well, but CSS Grid and Flexbox layouts are not reliably supported. A page built with a modern CSS layout framework may render with elements out of position.
- No JavaScript runs during conversion. If your page uses JavaScript to display content, style elements, or build parts of the page dynamically, none of that logic executes — only what's present in the static HTML markup converts.
- The file must be a complete HTML document. A file that doesn't start with a
<!DOCTYPE html>line or an<html>tag is rejected before conversion is attempted, even if the markup inside it is otherwise valid. - One file at a time, converted separately. Selecting several HTML files converts each into its own separate PDF; a "Download all" option then lets you download them together as a ZIP file, not as one combined PDF.
None of this makes the tool unreliable for what it's built for — a self-contained HTML page with inline styling converts cleanly and predictably. It's worth opening the resulting PDF and checking it against what you expected before submitting or printing it, the same way you'd proofread any document.
When This Is the Right Tool
- Turning a coding assignment into something printable: a student who built a simple HTML/CSS page for a web-development exercise can convert it to PDF for a teacher who wants a printable or gradable file rather than a folder of source files.
- Distributing a self-contained HTML handout: a teacher who wrote a worksheet or reference sheet directly in HTML (with all styling inline) can convert it to PDF once, so every student opens the same fixed layout regardless of device.
- Archiving a generated HTML report: a certificate, receipt, or report generated as an HTML template by some other process can be converted to PDF for records that need to stay fixed and shareable.
If the HTML page depends on external stylesheets, web fonts, hosted images, or any JavaScript to look or behave correctly, converting it here will strip those dependencies out — that's a sign this isn't the right tool for that particular page, at least not without first making it self-contained.
Example
A student builds a simple personal webpage for a web-design assignment: HTML structure with all the CSS written inline in a <style> block, no external images or fonts. Converting it here produces a PDF that looks identical to the page's own layout, because everything the page needs was already inside the single file that got uploaded — there was nothing external for the conversion to miss.
FAQs
What HTML files can I convert?
.html or .htm files, up to 10 MB, and the file must start with a doctype declaration or an <html> tag — a fragment of markup without that wrapper is rejected.
Why are the images in my PDF missing?
If the images are linked by URL or by a relative file path (pointing at a file on your own computer), they won't appear — the tool never fetches web resources and never receives files other than the one HTML file you upload. Embed images as base64 data directly in the HTML to have them convert reliably.
Will my page's JavaScript run in the PDF?
No. The conversion only reads the static HTML and CSS; any content or behavior that depends on JavaScript running won't be reflected in the output.
Can I convert several HTML files at once?
You can select multiple files, but each is converted into its own separate PDF. A "Download all" option then bundles the finished PDFs into a single ZIP file for convenience — it doesn't merge them into one document.
Is my file kept afterward?
No. Files are processed only to complete the conversion and are automatically deleted within 2 hours — see the Privacy Policy for details.
What other document formats can I convert to PDF?
For other source formats, use Word To PDF, Text To PDF, Excel To PDF, JPG To PDF, or PNG To PDF.