Base64 Encode / Decode

Convert plain text or binary data to Base64-encoded format, or decode a Base64 string back to its original text.

Mode

Input chars
0
Input bytes
0
Output chars
0
Size increase

How Base64 Works

Base64 encodes binary data into 64 ASCII characters. Every 3 bytes of input produce 4 Base64 characters. If input length is not a multiple of 3, = padding is added.

Base64 Alphabet

Character(s)Index Value(s)
A–Z0–25
a–z26–51
0–952–61
+62
/63
=Padding

Common Uses

Use CaseDescription
Email attachmentsMIME encoding for binary files
Data URLsEmbed images in HTML/CSS
JSON / APIsTransmit binary data in JSON
HTTP Basic Authuser:pass encoded in header
JWT tokensHeader and payload encoding