Convert HTML to GIF, one still picture per page

Turn an HTML file into a GIF online. No account needed.

or drop your HTML anywhere on this page

HTML → PDF → GIF

What you get: a still picture, not an animation

This HTML to GIF converter makes a still picture of your .html file, not a recording of it. Press Select HTML file (or drop an .html or .htm file anywhere on this page), pick a Resolution and press Convert to GIF. Our server lays the file out on A4 pages, as if it were printing them, and saves each page as a GIF. That is why the route reads HTML → PDF → GIF. A plain .txt file goes the same way when you convert text to GIF.

If you hoped to convert HTML to GIF as an animation, such as an ad banner or a page element that moves, this tool will not capture it. Scripts do not run and CSS animations do not play, so every GIF is a single frame. A short file gives one GIF named after it; a longer one gives a ZIP of numbered pages. Further down this page is a way to build a moving GIF from your HTML in a few steps.

Resolution is the only setting: 96, 150 (the default) or 300 DPI makes an A4 page 794 × 1123, 1241 × 1754 or 2481 × 3508 pixels. The route is graded Good enough, since the page is laid out for paper first. Text and flat colour come through as drawn, while photos lose fine detail, because a GIF holds at most 256 colours.

How to convert HTML to GIF

  1. 1
    Select or drop your HTML file

    Nothing uploads until you press convert.

  2. 2
    Choose your options

    We show the route and its fidelity grade up front.

  3. 3
    Download your GIF

    Then it is deleted after 24 hours, automatically.

What you are starting with

A document as markup. Opens in a browser, edits in anything.

What you are getting

256 colours and a loop. Old, limited, immortal.

Worth knowing

Each page is laid out as a word processor would print it, then drawn as a picture: side-by-side boxes stack, hidden parts show, web fonts become a standard font and scripts do not run. GIF keeps only 256 colours, so fine detail is lost.

Good to know about converting HTML to GIF

  • Every page becomes its own GIF. One page gives one picture; more give a ZIP named after your file, in order: article.html gives article-p001.gif, article-p002.gif and so on.
  • GIF keeps only 256 colours, so photos in the page lose detail. PNG suits pages with pictures better.
  • It converts an .html file you upload, not a web address. Images embedded in the file are kept. Images it links to, on another web address or as a separate file, are left out.
  • At the default 150 DPI each page is 1241 × 1754 pixels. Up to 100 pages at a time.

How your HTML is drawn before it becomes a GIF

No browser opens your file. It is laid out the way a word processor prints a page, so the GIF can differ from what your browser shows. Our test page, a sale banner with a photo, a table and two CSS animations, came out like this:

  • An element with a CSS animation keeps its normal style. A heading styled yellow, with an animation from green to red, came out yellow, and a box set to slide across stayed where it started.
  • Anything hidden until an animation reveals it shows anyway: a line at opacity: 0, waiting to fade in, was in the GIF.
  • An animated GIF inside the page shows its first frame only.
  • JavaScript does not run, so a paragraph that a script rewrites keeps its original words.
  • Boxes set side by side with flexbox are stacked. Table cells stay in a row, but borders given to them in CSS were missing, while the border attribute on the table tag drew them.
  • A picture written into the file as a data URI is kept, and the clear parts of a PNG turn white. A picture saved beside the file is missing, because only the .html is uploaded.
Tip: The first step of this route is the same conversion as HTML to PDF, so a PDF of your file shows exactly where each page, and so each GIF, will break.

A still of a web banner at its own size

Each page is A4 unless the HTML sets another size. For a banner, or the backup image of an HTML5 ad, add a CSS @page rule with the size and the margin in millimetres. In our test, @page { size: 80mm 66mm; margin: 0mm; } gave a GIF of 303 × 250 pixels at 96 DPI, filled edge to edge with the banner.

  • To find the size in millimetres, divide the pixels you want by the DPI and multiply by 25.4: 300 pixels at 96 DPI is about 79 mm.
  • Write the margin as 0mm. A plain margin: 0 was ignored, so the page kept its 2 cm margin and the last line spilled onto a second GIF.
  • Upload the banner as one .html or .htm file with its pictures written in as data URIs. The tool does not take a zipped ad package.

Building a moving GIF from your HTML

This page cannot record an animation, but it can draw each moment of one when you give every moment a page of its own. Then you join the pictures yourself:

  1. Write each frame as its own part of the file, and put style="page-break-before: always" on the heading that opens each frame after the first. The break worked on a heading in our test, but not on a div wrapped round the frame.
  2. Convert the file here and unzip the download. Our three-frame banner gave three GIFs of 303 × 250 pixels, numbered in order: frames-p001.gif, frames-p002.gif and frames-p003.gif.
  3. Add them to Images to GIF, check the order, and set the Time per frame (0.1 to 3 seconds) and the Repeat (Forever, Once or 3 times). Pick Original under Width to keep the banner's size. It works in your browser, so nothing is uploaded again.

For a document shown page by page rather than an animation, convert the HTML to PDF, then open the PDF in PDF to GIF and keep Animated GIF of all pages. Each page stays on screen for half a second to 5 seconds, and the GIF loops. That route takes two conversions.

When PNG or PDF is the better choice

A GIF is not always the poorer picture of a page. We converted a one-page receipt and our banner page with a photo at 150 DPI:

One A4 page as GIF and PNG at 150 DPI
Our test pageGIFPNGHow the GIF looked
A receipt: text and a table49 KB116 KBThe same as the PNG, every pixel within 2 shades
A banner with a photo224 KB547 KBClean text, a fine grain of dots over the photo
  • Text, tables and flat colour suit GIF: the receipt came out at less than half the size of the PNG and looked the same.
  • For photos, gradients or a picture you will edit, convert HTML to PNG. PNG keeps every colour: our photo had over 200,000, against 255 in the GIF.
  • For the smallest file, convert HTML to WebP: 67 KB for the banner page and 41 KB for the receipt at Balanced quality. When a form only takes JPG, convert HTML to JPG: 140 KB and 95 KB.
  • When the words must stay words, with links that still work and every page in one file, convert HTML to PDF.

Going the other way, convert GIF to HTML reads the words in a GIF back into a plain web page. Our receipt came back as lines of text with no table, and a few letters misread, so keep your original .html file.

Questions people ask

Will the GIF move like an animated web page?

No. JavaScript does not run, and each page is a still picture. A file of more than one page gives a ZIP of GIFs, one per page.

How do I make a moving GIF from HTML?

Give each frame a page of its own with page-break-before: always, convert the file here to get one GIF per frame, then join the GIFs in Images to GIF, where you set the time per frame and how often it repeats. Images to GIF runs in your browser.

Can I make a GIF of a live website?

No. This page converts an .html or .htm file you upload and does not open web addresses. For a live page, use your browser's Print and choose Save as PDF, which keeps its layout and images, then convert that PDF with PDF to GIF.

Why do the colours in my GIF look rough?

A GIF holds at most 256 colours. Our test photo went from over 200,000 colours to 255, and the missing shades were made up with a fine pattern of dots: right at normal size, grainy close up. Text and flat colour are not affected. For sharp photos, convert HTML to PNG instead.

Will the pictures in my HTML show in the GIF?

Pictures written into the file as data URIs do. A picture saved beside the .html on your computer is missing, because only the .html is uploaded, and both pictures we linked from other web addresses were missing too. An animated GIF in the page shows its first frame, and clear areas turn white.

What happens to a long HTML page?

Every A4 page becomes its own GIF, and you download them together as a ZIP named after your file: our report.html gave report-p001.gif to report-p005.gif. The page limit is 100; a longer file is stopped with a message that gives its page count.

Is converting HTML to GIF free?

Yes. Up to 25 MB and three conversions a day are free, with no account. Pro and Business lift the file limit to 100 MB and remove the daily cap.

What happens to my files?

Both your HTML and the GIF we produce are deleted 24 hours after each conversion, automatically. Try again and Continue to another tool start a new conversion, with its own 24 hours. Nothing is used for training and no human looks at your documents.

Will the GIF look exactly like the HTML?

This pair grades as “Good enough”. We show the exact route and that grade before you convert, so there are no surprises about what survives the trip.

Do I need to install anything?

No. Nothing to install. Pick or drop a file here, it's converted on our servers, and you download the result.

How large can my file be?

25 MB on the free plan, and 100 MB on Pro and Business.

Can I convert several files at once?

On Pro and Business, yes: add up to 100 files before converting. The free plan converts one file at a time.

Related conversions

Our cookies keep you signed in. If you accept, we also load Google Tag Manager, which runs Google Analytics and Microsoft Clarity (which records how you move around the site). None of them run unless you accept. The privacy page has the details.

Read first