Base64 Encoder / Decoder
Base64 encoding is a method used to convert binary data into an ASCII text format by translating it into a limited set of 64 unique, printable characters. It is commonly used to transmit binary data over channels designed to handle text. Base64 ensures that the data remains intact and unmodified during transport. For example, it is often used to encode images or other multimedia content in web pages via data URIs, or to embed small files in XML or JSON payloads.
Decoding Base64 reverses the process, reconstructing the original binary data from its encoded string. While not a form of encryption, Base64 encoding provides a reliable way to safely transmit data across systems that may not support raw binary formats.
This tool performs Base64 encoding and decoding in JavaScript using the btoa
and atob
functions, respectively. It also supports UTF-8 through the use of the TextEncoder
and TextDecoder
interfaces.