Link Search Menu Expand Document

Transparent background

Learn how to create images with transparent backgrounds.

How it works

To render an image with a transparent background, include the following in your CSS when generating your image.

body { 
  background-color: transparent;


This image has background-color: transparent; set on the body.

HTML/CSS to Image with a transparent background.

Try it yourself

Works with PNG's only

Transparency is only supported by the PNG file format. By default, all images are rendered as PNG’s. If you render the image as a JPG or Webp, the background will be white.

Need help?

Talk to a human: We always respond within 24 hours. And often, even faster.

Back to top

Built with extensive integration tests and serious care for developer happiness.
© 2018-2020 Code Happy, LLC.

Page last modified: Jan 16 2021 at 07:14 PM.

Edit this page on GitHub.