Base64 / Base64URL encoder–decoder
Base64 groups bytes into blocks of three and represents each block with four characters. UTF-8 text is converted to bytes first. For example, foo becomes Zm9v; f becomes Zg== in standard Base64 and Zg in Base64URL. Standard uses + and / and requires the necessary = padding. Base64URL uses - and _, emits no padding, and accepts either no padding or exactly correct padding. Decoding rejects spaces, newlines, mixed alphabets, malformed length, padding and nonzero trailing bits. Newlines in the original text are preserved when encoded and decoded. Invalid UTF-8 and lone surrogates are rejected. Base64 is encoding, not encryption. Binary file mode accepts any bytes, including invalid UTF-8, up to 1 MiB. Encode opens a file; decode downloads the original bytes as decoded.bin. The visible hex preview is limited to 128 bytes.
Inputs stay in this page. Nothing is uploaded or saved automatically.
Text or binary data: up to 1 MiB (1,048,576 bytes) before encoding or after decoding. Text mode requires valid UTF-8. Base64 input: up to 1,398,104 ASCII characters.