メインコンテンツにスキップ

Base64画像プレビュー&デコーダー

Base64でエンコードされた画像をプレビューし、クリーンなdata URIにデコードします。生のBase64または完全なdata:image/...;base64文字列を貼り付け——レンダリングされた画像と、検出された形式、MIMEタイプ、ファイルサイズを表示。

入力

貼り付けた文字列内の空白や改行は自動的に無視されます。

入力がdata:image/...;base64,プレフィックスのない生のBase64で、かつファイルのシグネチャから実際の形式を自動検出できない場合にのみ使用されます。

出力

プレビュー

Base64画像を貼り付けると、ここにプレビューが表示されます。

クリーニング済みの使用準備完了data URI——<img src>やCSSのurl()に直接貼り付け可能。

デコード情報
プロパティ
No data yet
役に立ちましたか?

ガイド

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.

ツールが気に入りましたか?広告をなくしましょう。

1回のお支払いでアカウントから広告が完全になくなります。サブスクリプションも追跡もありません。