Base64 Encoder / Decoder

Encode UTF-8 text to Base64 or decode Base64 back to UTF-8 text.

  • Runs locally in your browser
  • No upload required

Try it

Result
aGVsbG8=

Supported formats

Input
text
Output
text

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

Encoded 5 character(s) of UTF-8 text to Base64.

How it works

  • Read the input as UTF-8 bytes.
  • Applied the Base64 alphabet (A-Z, a-z, 0-9, +, /) with '=' padding.
  • Produced 8 character(s) of output.
  • Base64 is an encoding, not encryption; it provides no confidentiality.

Methodology

  1. Encode by grouping input bytes in threes and mapping each group to four characters from the standard Base64 alphabet, padding the final group.
  2. Decode by reversing that mapping and rejecting input whose length or alphabet is not valid Base64.
  3. Treat the result as an encoding only: it provides no confidentiality.

Usage

  1. Choose encode or decode.
  2. Paste the text or Base64 value.
  3. Read the converted output.

Examples

These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.

Encode ASCII

jsonSelect to copy
{
  "mode": "encode",
  "value": "hello"
}

Round-trip Unicode

jsonSelect to copy
{
  "mode": "encode",
  "value": "héllo 🌍"
}

Decode

jsonSelect to copy
{
  "mode": "decode",
  "value": "aMOpbGxvIPCfjI0="
}

Limitations

Where Base64 is appropriate

Base64 is for carrying binary data through channels that expect text, such as JSON fields or data URLs. It is deliberately not for hiding information: the alphabet is public and anyone can decode it.

Frequently asked questions

Why does the encoded length grow?
Base64 represents every three bytes as four characters, so the encoded form is about one third larger.
Is URL-safe Base64 supported?
This tool uses the standard alphabet. Replace '+' with '-' and '/' with '_' for URL-safe variants after encoding.

Sources

  1. RFC 4648: The Base16, Base32, and Base64 Data Encodings — IETF