Nexkits Nexkits Wiki
Back to Wiki Developer ยท Term Explanation

What Is Base64?

Base64 is an encoding that represents binary data as printable text. It is common in APIs, embedded images, email attachments, and token fragments.

One-line Explanation

Base64 is not encryption. It is a text representation of bytes so data can fit into JSON, HTML, or request parameters.

When You See It

  • APIs may use Base64 for images, certificates, signatures, or binary payloads.
  • `data:image/png;base64,...` in HTML means the image bytes are embedded as Base64 text.
  • JWT, Basic Auth, upload debugging, and encoding checks often involve Base64.

How It Works

Base64 groups raw bytes and maps them to printable characters.

Encoded output is usually longer than the source, often about one third larger. `=` at the end is padding.

Base64 can be decoded back to bytes, but it does not hide the content.

Examples

Text Base64

`hello` becomes the following Base64 string.

aGVsbG8=

Common Misunderstandings

  • Base64 is not encryption and should not be used to protect secrets.
  • Base64 makes data larger, so it is not compression.
  • Base64URL is a related variant that handles `+`, `/`, and `=` differently for URL-safe contexts.

FAQ