Base64 Converter

Encode text to Base64 or decode a Base64 string back to text.

Category: Converters

When to use?

Use it to decode a JWT token payload, analyze HTTP Basic auth credentials, or transmit binary data as text.

How to use

  • Encode: enter text to convert to a Base64 string.
  • Decode: enter a Base64 string to convert back to text.

Input Explanation

Enter the original string to encode or Base64-format text to decode.

Calculation Basis

Base64 represents binary data as text using 64 ASCII characters (A-Z, a-z, 0-9, +, /). It is about 33% larger than the original.

Usage Examples

  • Check a JWT payload - Decode the Base64-encoded payload of a JWT token to inspect it.
  • Analyze HTTP Basic auth headers - Decode the Base64 credentials in an Authorization: Basic header.
  • Decode a data URI - Decode the Base64 string in a data: URI to see the original content.

Examples

  • "Hello" → "SGVsbG8="
  • "Hi" → "SGk=" (UTF-8 basis)

Cautions

  • Malformed source data can cause parsing errors or broken output.
  • A mismatched encoding standard or complex nested data may break or drop the structure.

Guides

What Base64 encoding is

It converts binary data into 64 characters (A-Z, a-z, 0-9, +, /) for safe text transmission. Common in email attachments, data URIs, and API auth tokens.

Size increase note

Base64 makes data about 33% larger than the original. Converting images or files to Base64 increases size, so it is not ideal for large transfers.

FAQ

What is Base64?

An encoding that represents binary data as text using 64 ASCII characters.

How does the size change with Base64?

It grows about 33% larger than the original.

Can it encode non-ASCII text and emoji?

Yes, it encodes to UTF-8 first, then to Base64.

When does a Base64 decode error occur?

When non-Base64 characters are present or padding is incorrect.

Related Tools