Security & Encryption ツールの更新 2日前

Data URI / Base64 To Image Converter

Turn a Data URI or raw Base64 string back into a previewable, downloadable image. Choose the MIME type, add an optional file name and check the decoded dimensions.

Decoding is local, but an image from an untrusted source is still untrusted. The current build has a duplicate paste control, so paste directly into the textarea.

Data URI Input Base64 to Image Convert Data Download Image

使用方法 Data URI / Base64 To Image Converter

Base64 / Data URI → 画像

データURI(data/:image...;base64,...)または生のBase64を貼り付けると、ブラウザ上で即座に画像をプレビュー・ダウンロードできます。
クライアントサイドのみ
ヒント:生のBase64データを貼り付ける場合は、以下から適切なMIMEタイプ(例:image/png)を選択してください。
拡張子はMIMEタイプから自動的に判別されます。
ツールリンク
クリップボードにコピーされました。
このツールの改善にご協力ください

コンテンツを読む

このツールの仕組みと、いつ使用すべきかについて学びましょう。

Data URI / Base64 to Image

What a Data URI image is

A Data URI packs an image into a text string. It starts with data:, then a media type such as image/png, then a base64 marker and the encoded bytes. Browsers can display that string directly in an image tag, which is why small icons sometimes appear inside HTML or CSS without a separate file. This page goes the other way: it takes a Data URI or a raw Base64 string and turns it back into a preview and a downloadable image.

Raw Base64 versus a full Data URI

A full Data URI contains the media type, so the page can infer the format. A raw Base64 string contains only the payload, so you must choose the correct MIME type yourself. If you choose PNG for JPEG bytes, the preview may fail or the downloaded file may not open in some applications. If you are unsure, inspect the first characters of the decoded data or ask the person who supplied the string for the original media type.

How to convert the string

Paste the Data URI or raw Base64 into the textarea. Choose the matching MIME type from the list: PNG, JPEG, WebP, GIF, SVG, BMP or AVIF. Optionally enter a file name without a path. Press convert. The page decodes the payload, shows an image preview, reports the width and height, regenerates a clean Data URI and estimates the byte size. Use the download button to save the image.

Choosing the right MIME type

The type must match the actual bytes, not the file extension you want. A JPEG normally starts with bytes that identify JFIF or Exif, while a PNG starts with a characteristic signature. SVG is text-based XML, not a bitmap. AVIF support depends on the browser's decoder. If the preview is blank, try the other likely type, but do not keep guessing blindly; a wrong label can produce a file that opens in one program and fails in another.

Preview, dimensions and file name

The preview is rendered by the browser. The width and height come from the decoded image, so they are a useful check that the string contains the image you expected. The optional file name is used for the download; the extension is added from the selected MIME type. Keep the name short and avoid slashes, quotes and control characters. The page does not upload the file, rename it on a server or create a permanent link.

Supported formats and browser limits

The menu covers common web formats, but support is ultimately browser-dependent. PNG, JPEG, GIF and WebP are widely supported. SVG previews as an image and may be restricted by browser security rules. BMP is large but usually readable. AVIF needs a modern browser with an AVIF decoder. There is no explicit size cap, but a very large Base64 string can freeze the tab because the whole value is held in memory. Split or compress huge images before pasting.

Why the preview can fail

A blank preview usually means the Base64 is truncated, contains whitespace or line breaks that were not cleaned, uses an unexpected alphabet, or is labelled with the wrong MIME type. A Data URI copied from a chat app may have lost characters. A string copied from a database may include escaped quotes. If the page reports an image error, re-copy the full value and confirm that it begins with a valid data: prefix or a clean Base64 payload.

The paste button issue

The page has more than one control with the same paste identifier, so the settings-area paste action can do nothing in the current build. Paste directly into the textarea with the keyboard or the browser's context menu. The main convert, clear, copy and download buttons are the reliable path. If a button appears unresponsive, try the keyboard shortcut or paste manually rather than assuming the image is invalid.

Security and privacy

Decoding runs in your browser, so the string is not sent to Newisty. That does not make an unknown image safe. SVG can contain scripts or external references, and a downloaded file can be malicious regardless of its extension. Treat images from untrusted sources with caution, open them in a sandboxed viewer if necessary, and do not run an SVG as a script. Clear the textarea when you are done if the content is sensitive.

When this is useful

It is handy for recovering a small image from an HTML email, a CSS file, a JSON API response or a database dump. It can also help you inspect a Data URI before embedding it in a page. It is not a batch converter, an image editor or a compression tool. If you need to resize, crop or reduce the file size, decode the image first and use an image editor, then re-encode it.

Common problems

If the downloaded file will not open, check the selected MIME type and the first bytes of the payload. If the dimensions are wrong, you may have decoded a different image than you expected. If the textarea rejects a very long string, the browser may be hitting a memory limit. If the file name has no extension, add one manually only after confirming the real format. If the Data URI contains a charset parameter, the decoder may still accept it, but the media type must be correct.

What not to do

Do not paste a production secret or a private photo into a public page without checking how it is handled. Do not trust the MIME type alone as a security check. Do not use this page to edit, resize or compress an image. Do not assume a decoded SVG is harmless. Do not strip characters from a Base64 string to make it fit; a truncated payload will not decode correctly.

Frequently Asked Questions

よくある質問

ユーザーが結果を信頼する前に抱く疑問に対する簡潔な回答。

No. Decoding and previewing happen in your browser. The string is not sent to Newisty. The browser still holds the image in memory, and any file you download is stored on your device, so manage sensitive content accordingly.

A Data URI includes a media type and a base64 marker before the payload, while raw Base64 contains only the encoded bytes. With raw Base64 you must select the correct MIME type manually. A full Data URI usually tells the page what type to expect.

The string may be truncated, contain spaces or line breaks, use an unsupported alphabet or be labelled with the wrong MIME type. Re-copy the complete value, remove line breaks, and check the media type. An SVG may also be blocked by browser security rules.

The menu lists PNG, JPEG, WebP, GIF, SVG, BMP and AVIF. Actual support depends on the browser. PNG, JPEG, GIF and WebP are the safest choices. AVIF needs a modern decoder, and SVG previews can be restricted.

Yes. Enter a name without a path, and the page uses it for the download with an extension based on the selected MIME type. Avoid slashes, quotes and control characters. The name does not change the image bytes.

The current build has duplicate paste identifiers, so the settings-area paste control may be inactive. Paste directly into the textarea with Ctrl+V or the context menu. The convert and download controls still work.

Not necessarily. SVG is XML and can contain scripts or external references. Open untrusted SVGs in a sandboxed viewer, do not execute them as scripts, and do not assume that a successful preview proves the file is harmless.

コメント (0)

ユーザー間の議論、例外的なケース、および追加のヒントについて。
コメントを残す
コメントを送信すると、公開されます。
まだコメントはありません。ぜひ最初のコメントを投稿してください!
ぜひお知らせください!
このツールに関する問題を報告する

発生した問題について詳しくご説明ください。調査を行い、ツールの改善に役立てたいと思います。

最も役立つのは
入力内容、期待される結果、実際の結果、使用しているブラウザや端末、および必要に応じてスクリーンショットを記載してください。
スクリーンショットボタンをクリックすると、ブラウザ上のページがキャプチャされ、生成された画像がこのフォームに添付されます。
全画面のスクリーンショット
newistyを使って、お使いのブラウザでキャプチャしました。
まだスクリーンショットは撮影されていません。
ツール レポート