Base64 Encoder / Decoder
Encode plain text to Base64 or decode a Base64 string back to text. Handles Unicode, emoji, and international characters.
About Base64 Encoding
Base64 encoding increases the size of the data by approximately 33% (every 3 bytes become 4 characters). This overhead is acceptable in contexts where only text characters can be safely transmitted or stored, such as email, XML, or JSON payloads.
This tool handles full UTF-8 input correctly by encoding the text to UTF-8 bytes before applying Base64, and reversing that process on decode. This is important for non-ASCII input where using btoa directly would fail on many browsers.
Frequently Asked Questions
What is Base64?
Base64 is an encoding scheme that converts binary data into a string of ASCII characters. It uses 64 printable characters (A-Z, a-z, 0-9, +, /) and a padding character (=) to represent any sequence of bytes.
Is Base64 encryption?
No. Base64 is encoding, not encryption. It is reversible by anyone with the encoded string — there is no key or secret involved. Do not use Base64 to secure sensitive data.
Why does Base64 output end with = signs?
Base64 encodes 3 bytes at a time into 4 characters. If the input is not a multiple of 3 bytes, = characters are added as padding to make the output length a multiple of 4.
What is Base64 typically used for?
Base64 is commonly used to embed binary data (images, files) in text-based formats such as HTML, CSS, JSON, and email (MIME). It is also used in data URIs, HTTP Basic Auth headers, and JWT tokens.
Does this tool support Unicode and emoji?
Yes. The tool encodes the input as UTF-8 before converting to Base64, so all Unicode characters including emoji, Arabic, Chinese, and accented characters are handled correctly.
Related Tools
SHA-256 Generator
Generate a SHA-256 hash from any string using the Web Crypto API.
MD5 Generator
Generate an MD5 hash from any input string, implemented in pure JavaScript.
Timestamp Converter Tool
Convert Unix timestamps to human-readable dates and vice versa.
URL Encoder / Decoder
Encode or decode URLs and query strings with a single click.