Pular para o conteúdo principal

Visualização e Decodificador de Imagem Base64

Visualize uma imagem em base64 e decodifique-a de volta para um URI de dados limpo. Cole base64 bruto ou uma string data:image/...;base64 completa — veja a imagem renderizada junto com o formato detectado, tipo MIME e tamanho do arquivo.

Entrada

Espaços em branco e quebras de linha em uma string colada são ignorados automaticamente.

Só é usado quando a entrada é base64 bruto sem o prefixo data:image/...;base64, e o formato real não pode ser detectado automaticamente pela assinatura do arquivo.

Saída

Visualização

Cole uma imagem base64 para ver a pré-visualização aqui.

O URI de dados limpo e pronto para uso — cole-o em um <img src> ou url() CSS.

Info Decodificada
PropriedadeValor
No data yet
Isso foi útil?

Guias

What this tool does

Paste a base64-encoded image and see it rendered instantly — no guessing whether the string is valid, no need to build your own <img> tag just to check. It accepts raw base64 (just the encoded bytes) or a full data:image/...;base64,... URI, cleans up whatever whitespace or line wrapping got added when it was copied, and shows you the decoded image alongside its format, MIME type and file size.

How to use it

  1. Paste the base64 string into the input. Line breaks and spaces are stripped automatically, so a value copied from an email, a log line or a multi-line text file still works.
  2. If the string doesn't already start with data:, pick the image type — PNG, JPEG, GIF, WebP or SVG. This is only a fallback: if the actual file signature can be recognized, the tool trusts the bytes over your selection.
  3. The preview, decoded info table and a normalized data URI appear immediately — there's no button to press.
  4. Use the preview's Download action to save the decoded file, or copy the normalized data URI to paste straight into an <img src> or a CSS url().

Why the preview sometimes shows a different format than you picked

The tool reads the first few bytes of the decoded data (the file's "magic number") to identify PNG, JPEG, GIF, WebP and SVG content. If it recognizes a signature, that wins over the image-type dropdown or a mismatched data: MIME prefix — so a .png-named string that's actually a JPEG still renders and downloads correctly. The dropdown only matters when the bytes don't match any known signature.

Why there are no pixel dimensions

Reading an image's width and height requires the browser to actually decode and lay out the image (an Image/<canvas> element), which happens after this tool has already done its job of validating and previewing the string. What you get here — format, MIME type, decoded byte size and base64 length — is everything derivable straight from the encoded string itself.

Is my data private?

Yes. Decoding happens entirely in your browser — the base64 string, and the image it represents, are never uploaded or logged anywhere.

Common uses

  • Sanity-checking a base64 image before pasting it into HTML, CSS or an API payload.
  • Recovering a viewable, downloadable file from a base64 blob found in a log, database dump, or JSON response.
  • Confirming that a data: URI you copied is well-formed and points to the format you expect.
base64imagedecodepreviewdata-uriconverter

Use it from code

From 3 credits per call

REST API

curl -X POST https://api.iotools.cloud/v1/tool/base64-image-preview-decoder \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "base64Input": "R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",
    "mimeType": "image/png"
  }'

Swap in your own key from your account. The tool's fields are the body — no wrapper.

Ask an AI agent

Use the IOTools `base64-image-preview-decoder` tool (Base64 Image Preview & Decoder) on this input:

YOUR_INPUT_HERE

Paste this at any agent connected to the IOTools MCP server, then add your input.

Ama as ferramentas? Livre-se dos anúncios.

Um único pagamento remove todos os anúncios da sua conta, para sempre. Sem assinatura, sem rastreamento.