247888.XYZ

Base64 Encoder & Decoder

Convert UTF-8 text or a file to standard Base64, or decode a pasted string into a download. Inspect valid UTF-8 before copying it.

Convert Base64

Result

Loading tool controls…

Convert Base64

  1. Choose direction
    Encode
    UTF-8

    Choose direction

    Select text, file or decoding mode before entering the source.

  2. Supply bytes
    Alphabet
    A to Z, a to z, 0 to 9, + and /

    Supply bytes

    Paste text, pick a file up to 8 MB, or paste standard Base64. Whitespace between encoded lines is ignored.

  3. Save the result
    Output
    TXT or binary

    Save the result

    Copy the string for a text field or download decoded bytes for a binary attachment.

Check an accented letter

The UTF-8 bytes for café produce Y2Fmw6k=. Decode that string and the accent returns intact. A different source encoding may produce bytes that cannot be displayed as UTF-8.

Check an accented letter
café
Y2Fmw6k=
Check an accented letter

Recover a binary file

Select file encoding to preserve the exact bytes of an attachment. After decoding, choose the original extension when saving the binary file. Base64 alone does not record its name or media type.

Use the JSON formatter when the decoded text contains JSON.

If the sender supplied a digest, check the decoded download with the file checksum verifier.

Recover a binary file
Binary data
Byte-for-byte download
Recover a binary file

Identify what was encoded

Text encoding

Accents, emoji and non-Latin characters can occupy several bytes apiece. The length of a JavaScript string is a poor guide to the length of its Base64 representation.

Standard alphabet

A token containing a hyphen or underscore may use Base64URL. This decoder expects the standard plus and slash alphabet. Check the producer’s format if decoding fails.

Base64 Encoder & Decoder examples
SettingResult
caféY2Fmw6k=
Binary dataByte-for-byte download

Where are your records processed?

Encoding and decoding use this browser. Anyone with the encoded string can recover the bytes. Privacy policy.

  1. Choose direction
  2. Supply bytes
  3. Save the result

Base64 Encoder & Decoder questions

Is Base64 encryption?

No. It represents each group of three bytes with four text characters and offers no secrecy.

Can I paste a data URL?

Yes. A base64 data URL is accepted and its header is removed before decoding.

Why is the encoded file larger?

Four characters carry three bytes. The last group may also have padding.

Related tools