Base64 MIME Encoding With 76-Character Lines

MIME Base64 wraps lines at 76 characters. See what wrapped output looks like for email attachments and PEM-style data.

Part of the free Base64 Encoder. Runs in your browser — nothing is uploaded.

Base64 MIME Encoding With 76-Character Lines

Email standards (MIME) require Base64 lines of at most 76 characters. Many tools output one long line instead, which some systems reject. This example shows what wrapped output looks like for a longer input.

Worked example: A longer text, wrapped at 76 characters

Text

Base64 turns binary or text into a safe ASCII alphabet so it can travel through systems that only handle plain text, such as email bodies, JSON fields and URLs.

MIME Base64

QmFzZTY0IHR1cm5zIGJpbmFyeSBvciB0ZXh0IGludG8gYSBzYWZlIEFTQ0lJIGFscGhhYmV0IHNv
IGl0IGNhbiB0cmF2ZWwgdGhyb3VnaCBzeXN0ZW1zIHRoYXQgb25seSBoYW5kbGUgcGxhaW4gdGV4
dCwgc3VjaCBhcyBlbWFpbCBib2RpZXMsIEpTT04gZmllbGRzIGFuZCBVUkxzLg==

Practical tip

PEM files (certificates and keys) use 64-character lines instead of 76. Check which width your system expects before wrapping.

How to use this Base64 Encoder

  1. 1Use the live tool above — it runs entirely in your browser and never uploads your data.
  2. 2Paste the sample from the worked example, or use your own input.
  3. 3Copy the result, then adapt the same steps in your editor, script, or pipeline.

Base64 MIME Encoding With 76-Character Lines FAQs

Do decoders accept line breaks?

Most do. Standard decoders ignore whitespace and line breaks, but some strict ones require a single unbroken line.

Why 76 characters?

The limit comes from early email systems with line-length restrictions. MIME (RFC 2045) set 76 as the maximum for encoded lines.

More Base64 Encoder pages

Open the full Base64 Encoder tool →