Base64 & Data URI Converter
Encode text to Base64 and decode it back, convert any image or file into a data: URI you can paste straight into CSS or HTML, and decode data URIs to inspect their MIME type, size and preview. Encoding is UTF-8 safe, so Thai characters and emoji survive the round trip, and a URL-safe alphabet is one click away. Everything runs locally in your browser — your text and files are never uploaded.
Uses - and _ instead of + and / and drops the = padding — safe inside a URL or filename.
Encodes UTF-8 correctly, so Thai text and emoji never break.
Pick any image (PNG, JPG, SVG, WebP…). It is read locally and never uploaded. Max 5 MB.
Paste a full data: URI. Images render a preview; text types show the decoded content.
The result will appear here
Encode or decode text, turn a file into a data URI, or decode one you paste in.
Move the result into the input to reverse the conversion.
Type
—
File size
—
File name
—
MIME type
—
Decoded size
—
How to use
- Open the "Text ↔ Base64" tab and type or paste your content — auto-detect handles the direction.
- For files, switch to "File → Data URI" and choose an image to get its data: URI and a live preview.
- To inspect an existing data URI, use the "Data URI → decode" tab and paste it in.
- Toggle "URL-safe alphabet" when the Base64 must sit inside a URL or filename.
- Click Copy to grab the result, or Swap to reverse a text conversion.
Features
- UTF-8-safe encoding — Thai text and emoji never break
- Auto-detect encode vs decode, or set the direction explicitly
- URL-safe Base64 (- and _ with no padding) on demand
- Image or file to data: URI with instant preview and byte size
- Decode any data URI to see its MIME type, size and image preview
- 100% client-side — nothing is uploaded to a server