Base64 represents bytes as printable characters; it is not encryption or compression. First encode a known byte sequence, decode it, and compare the bytes exactly. Then repeat with non-ASCII text after explicitly choosing UTF-8, because the same visible characters can have different byte encodings.
Check padding, whitespace, malformed characters, and the URL-safe alphabet separately. A forgiving decoder may accept more than a strict one, so report the mode selected instead of calling every rejected string a bug. Include the original bytes, encoded text, expected result, and any error message. See RFC 4648 for the common alphabets.
Base64 maps each group of three bytes into four text characters, with padding when needed. That makes the encoded payload roughly one-third larger, before any surrounding data format or line breaks.
It is useful when binary data must pass through a text-only channel, not when the goal is compression or secrecy. Large images and videos are usually better kept as files. If you are comparing sizes, include the full output and know whether you measured bytes or displayed characters. The Base64 tool can demonstrate this with harmless sample data.
Anyone can decode the result; it is not encryption.
Base64 is an encoding, not a compression method or a security boundary. It is useful when a protocol accepts text but you must carry a small binary value, such as an image in a JSON field. Its encoded payload is roughly one-third larger than the original bytes, before any surrounding data format overhead.
For larger or reusable assets, prefer a separately served file: it can be cached and updated independently from the page or message that references it. An embedded data URL may simplify a tiny self-contained document, but it also increases that document’s size. Decide using total transfer, caching behavior, and the receiving system’s limits—not only the number of requests. Never treat Base64 as encryption.
Try the Base64 tool.
Base64 represents bytes with printable characters so binary data can travel in places such as JSON fields or email bodies. It is an encoding, not encryption: anyone can decode it.
Try a short known sample and decode it back to the same bytes. If you start with text, specify the character encoding—usually UTF-8—before Base64 encoding. Check whether the destination expects the standard alphabet, a URL-safe variant, or padding. The encoded output is typically larger than the input, so large files are often better sent as files or streams.
Do not paste secrets into a public encoder just because the output looks unreadable. See RFC 4648 for the format.