Base64 Encoder Decoder Online Free
Base64
100% in your browser — no libraries, no data sent to the server.
File
Drag and drop a file here
or
0 source characters → 0 Base64 characters
Image preview
Binary file detected
What is Base64 used for?
- Embed images in CSS or HTML via a data URL.
- Transmit files in a JSON API (Base64 string on client or server side).
- Encode credentials for HTTP Basic Auth headers (
Authorization: Basic …). - Store binary data in text-only formats (logs, metadata, etc.).
How it works
- Encode: choose text or file; text is encoded to UTF-8 then Base64, file becomes a complete data URL.
- Decode: paste raw Base64 or a data URL; line breaks are automatically removed.
- Result: image displayed if MIME is an image, text if readable UTF-8, otherwise binary download offered.
Frequently Asked Questions
- How do I encode text to Base64?
- Encode mode, choose "Text → Base64", enter your text: the result updates in real time.
- How do I decode Base64 to text?
- Decode mode: if the decoded content is valid UTF-8 text, it displays in the result area.
- Can I encode an image to Base64?
- Yes, use "File → data URL" and import your image (PNG, JPEG, etc.).
- What is Base64 used for?
- To transport bytes as safe text for JSON, XML, URLs, or email.
- What is the maximum file size?
- No limit imposed here: everything is local. A warning appears beyond 5 MB.