---
layout: page
title: Base64 to image
permalink: /guides/advanced/base64/
parent: Advanced
grand_parent: Guides
nav_order: 4
description: >-
Convert base64 to PNG, JPG, or PDF with HTML/CSS to Image using the API, Zapier, or AI assistants via MCP.
---
# Convert base64 to an image
{: .no_toc }
{: .fs-9 }
Learn how to generate PNGs, JPGs, or PDFs from base64. Works with Zapier and Make.
{: .fs-6 .fw-300 }
## How it works
To render base64 to an image, you can use an `img` tag and set the `src` to the base64 of your image.
The rendered result is available as PNG or JPG. To generate a PDF, append `.pdf` to the returned image URL. See [PDF options](/parameters/pdf_options/) to customize page size, margins, scaling, and backgrounds.
```html
```
## Example
In this example we convert a base64 of our logo into an image.
{% cloudinary /assets/images/base64-logo.png sizes="100px" alt="Convert base64 to an image" %}
```html
```
## Use this with Zapier or Make
We have integrations for both Zapier and Make. You can use the example code above to convert base64 to images without writing any code yourself.
[Zapier](/integrations/zapier/){: .btn .btn-green .fs-5 .mb-4 .mb-md-0 .mr-2 }
[Make](/integrations/make/){: .btn .fs-5 .mb-4 .mb-md-0 .mr-2 }
{% include code_footer.md version=3 %}