Keypunch · 80 columns · 12 rows
Base64 Encoder/Decoder
Type on the left and the card punches itself, one column per Base64 character in the old Hollerith code. Decode a card back into text, or punch a whole file.
Base64, punched by column
Base64 turns any bytes into text using 64 symbols: A to Z, a to z, 0 to 9, plus and slash, with = as padding. Every three bytes become four characters, so the output is about a third longer than the input. It is not encryption, just a way to carry binary data through places that only accept text: email attachments, JSON, data URLs, HTTP headers.
The card is not decoration. A punched card holds 80 characters, one per column, and each character is a pattern of holes in 12 rows: the Hollerith code. The 029 keypunch printed exactly 64 characters, the same size as the Base64 alphabet, because both are six-bit codes. This page punches each Base64 character with its real 029 or EBCDIC pattern and prints the interpretation along the top edge, the way a keypunch did.
What the options do
URL-safe swaps + and / for - and _ so the result survives inside a URL or a filename. No padding drops the trailing = signs, which JWTs and many APIs leave out. Decoding accepts both alphabets and missing padding automatically. Text is treated as UTF-8, so emoji and accented letters round-trip correctly.
Is Base64 secure?
No. Anyone can decode it in a second, including this page. Use it for transport, not for hiding anything.
Why does my output end with = or ==?
Padding. Base64 works in groups of three bytes; when the input is not a multiple of three, the last group is filled out and marked with one or two = signs so the decoder knows how many bytes were real.
Does it handle files?
Yes, up to 5 MB, entirely in your browser. Pick a file and its bytes are encoded; tick "as a data URL" to get a string you can drop straight into an img src or a CSS url(). Nothing is uploaded.
What happens on a bad card?
If the input to decode contains characters outside the Base64 alphabet or has an impossible length, the card is stamped REJECT and the message under the output says what is wrong.