What this tool does
Converts UTF-8 text to standard Base64 and back, encodes local files, and reconstructs downloadable binary files from plain Base64 or data URLs.
How to use it
- Choose UTF-8 text or files/data URLs and provide the source.
- Choose encode or decode; file encoding can include a MIME-bearing data URL.
- Copy the text result or download decoded bytes, then clear the working input.
Worked example
‘Hello’ encodes as SGVsbG8=, and ‘你好’ as 5L2g5aW9. Emoji are first encoded as UTF-8 bytes. data:text/plain;base64,SGVsbG8= decodes to a five-byte file containing Hello.
Processing and explanation
Base64 represents each three bytes with four ASCII characters. TextEncoder creates UTF-8 bytes before encoding, and a strict TextDecoder rejects invalid UTF-8 when decoding text. Binary mode preserves bytes without interpreting them as text. Plain Base64 contains no filename or MIME information; data URLs can supply a MIME type. Padding bits are validated to reject noncanonical encodings.
Limits and common mistakes
5 MiB of input-file or decoded bytes, including UTF-8 text bytes; encoded input has a bounded allowance for whitespace. Accepts standard +/ alphabet, ASCII whitespace and correctly unpadded values. URL-safe -_ encoding and data URL parameters are unsupported. Base64 is not encryption and usually expands data by about one third. Large inputs can briefly pause the tab.
Privacy and your input
Files and text are processed in this tab and not uploaded, logged in analytics, stored or included in URLs. Decoded files are downloaded as bytes without HTML/image preview or execution. The device clipboard and downloaded files are managed by your browser and operating system.
Frequently asked questions
- Why does binary Base64 fail in text mode?
- Binary bytes may not be valid UTF-8. Use file mode to download them without interpreting their contents.
- Can Base64 hide a secret?
- No. Anyone with the encoded string can decode it; use a suitable encryption system when confidentiality is required.
- Which file type is downloaded?
- A valid data URL supplies its MIME type. Plain Base64 uses application/octet-stream, and you choose a filename.
Material content update: