MIME Base64 is the form of Base64 defined in RFC 2045 for the Content-Transfer-Encoding: base64 used by email and many internet message formats. It is ordinary Base64 — the standard A–Z a–z 0–9 + / alphabet with = padding — with one extra rule: the output is broken into lines of no more than 76 characters, separated by CRLF. This tool produces correctly wrapped MIME Base64 and decodes it back.
How it works
To encode, the text is converted to UTF-8 bytes and processed three bytes at a time. Each 3-byte (24-bit) group becomes four 6-bit symbols from the alphabet. When the final group has only one or two bytes, the missing positions are filled with = so the symbol count stays a multiple of four. Finally the continuous Base64 string is sliced into 76-character lines joined by \r\n, as MIME requires.
To decode, all whitespace and line breaks are removed, the remaining characters are validated against the alphabet, and the length is checked to be a multiple of four. The 6-bit values are repacked into bytes and read back as UTF-8, with a clear error for invalid characters, bad length, or non-UTF-8 bytes.
Example
Encoding Gera Tools produces R2VyYSBUb29scw==. Because it is shorter than 76 characters, it stays on a single line. A longer input — such as a paragraph — would be split into several 76-character lines with CRLF between them.
Notes
The only difference between this and a plain Base64 encoder is the 76-character line wrapping; the underlying bytes are identical. Everything runs locally in your browser, so nothing you type is uploaded.