Web Tools
Base64 Image Encoder/Decoder
Encode and decode base64 image strings with automatic MIME type detection. Output as data URI, raw base64, img tag, or CSS background. Supports PNG, JPEG, GIF, SVG, and WebP. Runs entirely in your browser — your data never leaves your machine.
base64 image encoder decoder data-uri converter png jpeg svg
Published May 29, 2026
All interactive tools run entirely in your browser. Your data never leaves your device.
How It Works
Paste a base64-encoded image string (raw or as a data URI) and instantly convert it between output formats. The tool auto-detects the image MIME type from base64 signatures, shows a live preview, and reports the decoded file size. Switch to decode mode to inspect image metadata.
Features
- Auto MIME detection: identifies PNG, JPEG, GIF, SVG, and WebP from base64 signatures
- 4 output formats: data URI, raw base64, HTML img tag, CSS background-image
- Live image preview: renders the decoded image with a checkerboard transparency background
- Decode/inspect mode: shows MIME type, base64 length, and decoded byte size
- Data URI passthrough: accepts both raw base64 and full data URI input
- 5 MIME types: PNG, JPEG, GIF, SVG, WebP with manual override
- 5 examples: 1x1 PNG, 1x1 GIF, SVG circle, data URI PNG, 1x1 JPEG
- Private: runs entirely in the browser — no data transmitted
Use Cases
- Embedding small images directly in HTML or CSS without extra HTTP requests
- Converting image base64 strings to different output formats for code snippets
- Inspecting base64-encoded images from APIs or database fields
- Generating data URIs for placeholder images and favicons