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.
- Base64
How Base64 encodes three bytes
- Write the bytes in bits, eight bits each.
- Cut the bits into groups of six. When the input is not a multiple of three bytes, the end is padded and marked with =.
- Map each group value, from 0 to 63, to a character: A to Z, a to z, 0 to 9, +, and /.