Base64 Encoder & Decoder
Encode text or files to Base64 — or decode Base64 strings back to text. Auto-detection, image preview, and file support. Runs entirely in your browser.
This tool encodes text and files to Base64 and decodes Base64 back to its original form, entirely in your browser. Base64 represents binary data using 64 ASCII characters so it can travel safely through text-only channels — it is an encoding, not encryption, and provides no security.
Input
Outputread-only
About this tool
A fast, privacy-first Base64 tool that works offline. Switch between Encode, Decode, and Auto Detect modes — the output updates instantly as you type. Use the File tab to convert any file to Base64, useful for embedding images in CSS data URLs or sending binary data over text-based APIs.
When decoded output contains an image, a live preview appears automatically. Your data never leaves your device.
How to use
Choose a mode
Select Encode to convert text to Base64, Decode to convert Base64 back to text, or Auto Detect to let the tool decide.
Enter text or upload a file
Type or paste content in the Text tab for string encoding. Switch to the File tab to upload any file type and convert it to Base64.
See the result
The output appears instantly as you type. If the decoded output is an image, a live preview is shown automatically.
Copy or Download
Click Copy to copy the result to clipboard, or Download to save the output as a file.
At a glance
- Directions
- Encode to Base64 and decode back
- Inputs
- Text and files
- What Base64 is
- An encoding that represents binary data using 64 ASCII characters so it survives text-only channels
- What it is not
- Encryption. Base64 is trivially reversible by anyone and provides no security whatsoever
- Size cost
- Encoded output is roughly 33% larger than the input
- Privacy
- Encoding runs in your browser; files are never uploaded
Sources & references
- RFC 4648 — Base16, Base32 and Base64 Encodings — The encoding specification
- MDN — Base64 — How Base64 is used on the web, and why it is not encryption
Related tools
Frequently asked questions
Common questions about Base64 encoding and decoding.
Last updated
