Base64 Encoder & Decoder
Convert Unicode text or local files into Base64, or turn an encoded value back into readable text or a binary download. Choose standard Base64, URL-safe output or a data URI for the job you are doing.
Local processing · No account required · Copy and export
Workspace
PixelOkay · Developer toolsHow to use Base64 Encoder & Decoder
- Choose text encoding, UTF-8 decoding, file encoding or binary decoding. Select a file only when using file encoding.
- Choose the output representation. Set a download filename and, for a binary download, the MIME type you expect.
- Convert and inspect the result. Use the reverse-text action for a round trip, or download decoded bytes instead of forcing binary data into text.
When to use this tool
Prepare a data URI, inspect a Base64URL payload or move a small binary fixture through a text-only workflow. Base64 changes representation; it does not encrypt the content.
Base64, Base64URL and data URIs
Base64 represents every three input bytes using four encoded characters, with padding when required. It commonly increases size by about one third before any transport compression. Base64URL substitutes - and _ for + and / and omits trailing padding here. A data URI adds a media-type prefix so the encoded bytes can be embedded in another document.
Worked example
UTF-8 text: Hello
Standard Base64: SGVsbG8=
Text data URI: data:text/plain;charset=utf-8;base64,SGVsbG8=Limits and output checks
Encoding is not encryption. Anyone with the value can decode it. UTF-8 decoding rejects invalid byte sequences; use binary decode for arbitrary files. The selected binary MIME type labels the download and does not convert its contents. Large files still consume browser memory.
Reference: Base64 terminology and encoding.
Frequently asked questions
Can this decode images or PDF files?
Yes, use binary decode and download the bytes with the correct filename. The tool does not inspect whether those bytes really form a valid image or PDF.
Why does a decoded file fail in text mode?
A binary file can contain byte sequences that are invalid UTF-8. Binary decode avoids interpreting those bytes as characters.
Does Base64 make sensitive data safe to share?
No. Base64 is a reversible representation with no secret key. Treat encoded credentials and documents as sensitive.
A practical workflow
Encode a small file when a receiving format requires Base64, or choose binary decode when the original value represents arbitrary file bytes.
Read the scope alongside the result
A MIME label does not convert file contents. Encoded credentials and private data remain sensitive because Base64 provides no secrecy.