' + '

Base64

Encode and decode Base64 strings

What Is Base64?

Base64 encodes arbitrary binary data as a string of 64 printable ASCII characters (A-Z, a-z, 0-9, +, /). The = padding at the end aligns the output to a multiple of 4 characters. The name comes from the 64-character alphabet, not from the number 64 itself.

Common Use Cases

Base64 vs. Base64url

Standard Base64 uses + and /, which need percent-encoding in URLs. Base64url replaces them with - and _ and omits the = padding, making it safe in URL query strings and JWT segments without further encoding. This tool uses standard Base64.

Size overhead

Base64 increases size by approximately 33%. A 300-byte image becomes a 400-character string. For anything larger than ~1 KB, loading it as a separate resource is usually more efficient than inlining as a data URI.