Skip to content
CalculatorAtlas

Base64 Encode/Decode

Tested

Encode text to Base64 or decode Base64 to text (UTF-8).

Tested, not yet published. The formula for this calculator is implemented and passes its automated checks. This page stays non-indexable until it is reviewed and published.

Results

Enter your values and press Calculate. Results appear here.

  • • Result

Quick answer

Base64 encodes UTF-8 bytes into 64 printable characters, per RFC 4648. 'Hello' encodes to SGVsbG8=.

Choose encode or decode and enter text. The calculator returns the result.

Related tools: URL Encode/Decode: Percent-encode text for a URL or decode it. IP Subnet Calculator: IPv4 network, broadcast, mask and host range from an address and CIDR prefix. Download Time Calculator: Time to download a file at a given speed.

How to use the Base64 Encode/Decode

  1. Choose direction: Encode and Decode.
  2. Type text.
  3. Press Calculate to see the result, and use Reset to start again.
Inputs of the Base64 Encode/Decode
InputWhat to enterAllowed values
DirectionChoose one: Encode; DecodeStarts at Encode
TextText—

Formula and method

Formula

RFC 4648 Base64 over UTF-8 bytes

IEEE-754 double precision; shown to the decimals indicated.

Standard alphabet with padding.

Worked examples

These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.

Example 1

Inputs: Direction = Encode; Text = Hello.

Results of example 1
ResultValue
Base64SGVsbG8=

Example 2

Inputs: Direction = Decode; Text = SGVsbG8=.

Results of example 2
ResultValue
Decoded textHello

Example 3

Inputs: Direction = Encode; Text = Calculator Atlas!.

Results of example 3
ResultValue
Base64Q2FsY3VsYXRvciBBdGxhcyE=

The first line is the headline result (base64). IEEE-754 double precision; shown to the decimals indicated.

How it works

Every 3 bytes (24 bits) become 4 characters of 6 bits each, so output is about a third larger. The '=' padding fills out a final group.

Not encryption

Base64 only changes representation; anyone can decode it. Do not use it to protect passwords or secrets. It is used for embedding binary data in text formats such as JSON, email and data URLs. This page encodes text, not files.

What happens with invalid input

These messages are produced by the calculator itself, so you know what to fix.

  • Text: entering "***" shows "That is not valid Base64." beside that field and no result.

Choosing between the Base64 Encode/Decode and similar calculators

Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.

Choosing between the Base64 Encode/Decode and similar calculators
CalculatorYou enterIt returns
[URL Encode/Decode](/technology/url-encode-decode/)direction and textEncoded text
[IP Subnet Calculator](/technology/ip-subnet-calculator/)iPv4 address and cIDR prefix lengthNetwork
[Download Time Calculator](/technology/download-time-calculator/)file size, size unit and connection speedTime
[Binary Calculator](/technology/binary-calculator/)first binary number, second binary number and operationResult
[Hex Calculator](/technology/hex-calculator/)first hex number, second hex number and operationResult

Assumptions and limitations

  • Encoding is not encryption

If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for text to confirm this.

Frequently asked questions

Is Base64 secure?

No. Base64 is an encoding, not encryption, and anyone can decode it.

Why the equals sign?

The = characters pad the output so its length is a multiple of four.

Can I encode an image?

This page handles text only.

What does the Base64 Encode/Decode calculate?

Encode text to Base64 or decode Base64 to text (UTF-8). It returns Base64.

What formula does the Base64 Encode/Decode use?

RFC 4648 Base64 over UTF-8 bytes. Standard alphabet with padding.

What do I need to enter in the base64 Encode/Decode?

You enter Direction and Text.

How is the result rounded or limited?

IEEE-754 double precision; shown to the decimals indicated. Encoding is not encryption.

What does the “Direction” option change?

It sets how the base64 Encode/Decode is worked out. The choices are Encode and Decode.

What is an example of a base64 Encode/Decode result?

With direction Encode and text Hello, the base64 is SGVsbG8=.

Where does the method come from?

The method follows: RFC 4648 §4 Base64; UTF-8 (RFC 3629).

Sources

  • RFC 4648 §4 Base64; UTF-8 (RFC 3629)

Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.