Base64 Encoder/Decoder — Online Base64 Tool

Encode and decode Base64 strings online. Convert text to Base64 or decode Base64 to plain text and binary data.

By SwiftCalcTools Editorial Team · Formula verified

Loading Base64 Encoder/Decoder…

Preparing your calculator

How to Use Base64 Encoder/Decoder

  1. 1Enter the required values in the input fields above.
  2. 2Click the Calculate button or results update instantly as you type.
  3. 3View your results in the output panel below the inputs.
  4. 4Adjust any values to recalculate instantly.

Frequently Asked Questions

Base64 encodes binary data as ASCII text using 64 printable characters (A-Z, a-z, 0-9, +, /). It is NOT encryption — anyone can decode it. It increases size by ~33% (3 bytes → 4 characters). Used in email attachments (MIME), data URIs in HTML/CSS, JSON payloads, and HTTP Basic Auth headers.
Use Base64 when: embedding binary data (images, files) in text-only formats (JSON, XML, HTML). Storing binary data in databases that only support text. Transmitting binary in HTTP headers or URLs (use URL-safe Base64 for URLs). Encoding credentials in HTTP Basic Auth (NOT for security — combine with HTTPS).
Standard Base64 uses + and / which have special meaning in URLs. URL-safe Base64 replaces + with - and / with _ and omits padding (=). Example: standard btoa() output may contain +/= which must be percent-encoded in URLs. Many APIs (JWTs, Firebase) use URL-safe Base64 (also called Base64url).
Base64 expands data by 33–36%: every 3 bytes become 4 ASCII characters. With line breaks (MIME standard, 76 chars/line), overhead is ~37%. Example: 1 MB binary file → ~1.37 MB Base64. When transmitting over HTTP with gzip compression, Base64 compresses poorly because its character set is not repetitive.