Skip to content
EMV Tools

Tools

Base64 encoder and decoder

Base64 writes binary data as text: every 3 bytes become 4 characters from a 64-character alphabet, with = as padding. Payment APIs, certificates, and logs often use it for keys, cryptograms, or whole messages.

Use it when a log or an API gives you Base64 and you need the hex to decode it with the other tools, or the other way round.

The decoder shows the bytes as hex and as text. It also reads the URL-safe alphabet (- and _) and ignores spaces and line breaks.

Worked example: the Base64 text nwIGAAAAABAA is the hex 9F 02 06 00 00 00 00 10 00: tag 9F02 (the amount), length 06, and the value 000000001000.

New to EMV? Read EMV in 5 minutes or browse the glossary

Everything runs in your browser. Nothing you enter leaves this page.

Direction
Base64

How Base64 encodes three bytes

How Base64 encodes three bytesThe text Man is three bytes, 4D 61 6E, or 24 bits. Base64 cuts them into four groups of six bits with the values 19, 22, 5, and 46, and maps each value to a character: T, W, F, and u. The result is TWFu.TextBytes6-bit groupsBase64Man4D616E01001119T01011022W0001015F10111046u
  1. Write the bytes in bits, eight bits each.
  2. Cut the bits into groups of six. When the input is not a multiple of three bytes, the end is padded and marked with =.
  3. Map each group value, from 0 to 63, to a character: A to Z, a to z, 0 to 9, +, and /.