# Conversão de imagem para Base64

> Codifique uma imagem como data URL Base64.

[Open tool](https://www.toolcabana.com/pt-br/image-to-base64) · [Imagens e design](https://www.toolcabana.com/pt-br/category/images-and-design)

Tool ID: image-to-base64. Requested language: pt-BR. Description language: pt-BR. Complete guide translation: yes.

## Overview (en)

Image to Base64 encodes an image file into a Base64 data URL that begins with data:image/ and the file type. The original bytes are encoded unchanged, so the format, quality and any embedded metadata are preserved. You can copy the string or download it as image-base64.txt for use in HTML, CSS or JSON.

## Supported tasks (pt-BR)

Codifique uma imagem como data URL Base64.

## Steps (pt-BR)

1. Escolha um arquivo de origem. Se a ferramenta aceitar vários arquivos, ordene-os como quiser.
2. Verifique o formato de origem antes de executar a operação.
3. Execute a conversão de imagem para Base64, revise a saída e use os controles disponíveis para copiar ou baixar.

## Settings

No additional settings.

## Limitations (pt-BR)

As imagens são limitadas a 32 megapixels e 16,000 pixels por lado. A maioria das operações aceita uma fonte; as operações em lote compatíveis geram um arquivo ZIP.

## Privacy and connections (pt-BR)

Esta operação processa sua fonte no seu navegador. Copiar e baixar são ações explícitas; a entrada de origem não é salva em conta nem em histórico.

## Questions (pt-BR)

### How do I use a Base64 image in HTML or CSS?

Paste the full data URL as the src of an img element or inside url() in a CSS background property. The string already includes the data:image prefix and MIME type, so no extra formatting is needed.

### Does converting an image to Base64 remove EXIF data?

No. The file is encoded byte for byte, so EXIF, GPS and other embedded metadata remain inside the Base64 string. Strip the metadata first if you plan to publish the encoded image.

### Why is the Base64 string bigger than my image file?

Base64 represents every 3 bytes of binary data with 4 text characters, so the encoded string is roughly a third larger than the original file. Large images therefore produce very long strings.

### Onde minha entrada é processada?

Esta operação processa sua fonte no seu navegador. Copiar e baixar são ações explícitas; a entrada de origem não é salva em conta nem em histórico.

### Quais são os limites de entrada?

As imagens são limitadas a 32 megapixels e 16,000 pixels por lado. A maioria das operações aceita uma fonte; as operações em lote compatíveis geram um arquivo ZIP.

## Related tools

- [Base64 to image](https://www.toolcabana.com/pt-br/base64-to-image)
- [Image to ASCII art](https://www.toolcabana.com/pt-br/image-to-ascii)
- [Social image resizer](https://www.toolcabana.com/pt-br/social-image-size)
- [Color picker from image](https://www.toolcabana.com/pt-br/image-color-picker)
