Base64 Encoder / Decoder

Encode strings, decode base64 text, and convert images to/from base64.

123456789101112131415
123456789101112131415
lock

Encoding

Convert any string or binary data to Base64-encoded ASCII text for safe transport over text-only channels.

lock_open

Decoding

Decode Base64 strings back to their original form. Supports URL-safe Base64 (+ vs - and / vs _).

image

Image Conversion

Upload any image to get its Base64 data URI, perfect for embedding assets directly in HTML or CSS.

What Is a Base64 Encoder/Decoder?

Base64 encoding converts binary data or arbitrary text into a string of 64 printable ASCII characters — A-Z, a-z, 0-9, + and /. This allows binary content to be safely transmitted through text-based systems that might otherwise mishandle raw bytes.

Base64 decoding reverses the process, converting the encoded ASCII string back to the original binary data or text. Together they form the foundation for embedding images in CSS, encoding email attachments, and transmitting binary data in JSON APIs.

Common Use Cases

  • check_circleEncode binary data for embedding in JSON API payloads
  • check_circleDecode Base64-encoded strings from API responses
  • check_circleEncode images as Base64 for CSS data URIs
  • check_circleDecode JWT token payloads from Base64 for inspection
  • check_circleEncode authentication credentials for HTTP Basic Auth headers
  • check_circleDecode Base64 email attachments to inspect their content
transform

Encode and Decode

Switch between Base64 encoding and decoding in a single tool — paste raw text or a Base64 string and get the converted result instantly.

verified

Standard Base64

Uses the standard Base64 alphabet (RFC 4648) with + and / and = padding, compatible with all major languages and systems.

lock

Browser-Only

All encoding and decoding runs locally. Your data never leaves the browser.

Frequently Asked Questions

What is Base64 used for?

Base64 is used to safely transmit binary data through text-based protocols: embedding images in HTML/CSS, encoding email attachments, storing binary data in JSON, and encoding credentials in HTTP headers.

Does Base64 compress data?

No. Base64 increases data size by approximately 33% because it represents every 3 bytes as 4 characters. It is an encoding scheme, not a compression algorithm.

What is the difference between Base64 and Base64url?

Base64url replaces + with - and / with _ to make the encoded string safe in URLs and filenames without percent-encoding. JWT tokens use Base64url encoding.

Can Base64 encode any type of data?

Yes. Base64 encodes any sequence of bytes, whether text, images, audio, or other binary formats. The encoded output is always plain ASCII text.

Base64 Encoder/Decoder Online — Free | OpenFormatter | OpenFormatter