Base64 Converter for Text, Hex and Files

Convert text or hex bytes using standard or URL-safe Base64. Convert files separately, entirely in this browser.

Result

Enter values and select Calculate.

How is this calculated?

Map three input bytes to four characters, or decode characters back to bytes.

Encode or decode a file

Local file controls

Worked example: Encode a UTF-8 label

The accented character uses two UTF-8 bytes. The result encodes five bytes.

Method and limits

Text, images and arbitrary files can be transferred via Base64. In the file section, encode up to 2 MiB of original bytes, or decode Base64 text representing up to 2 MiB. Base64 text is larger than the original. A bounded allowance supports common line wrapping. Decoded data is downloaded as inert binary with a neutral filename; rename it only if you know its format. No preview or execution. Base64 is not encryption. URL-safe encoding here omits padding; decoding accepts correctly padded or unpadded input.

How to use this calculator

  1. Choose a conversion direction and either the standard or URL-safe alphabet. Choose Hex instead of Text if the original content is arbitrary bytes.
  2. Paste a short value and select Convert value. For local files, use the separate file controls below and save the resulting download.

Encode a short UTF-8 label

The label café is five UTF-8 bytes, 63 61 66 c3 a9. Standard Base64 produces Y2Fmw6k=; the URL-safe version here omits the ending equals sign.

Use hex when the result is not text

Base64 maps bytes into printable characters. A decoded sequence may not represent UTF-8 at all; the hex view displays each byte without trying to interpret it as a letter.

Match the alphabet on both sides

Standard uses + and /, and URL-safe uses - and _. Standard output here uses padding when needed; URL-safe output here omits it.

Frequently asked questions

Is Base64 encryption?
No. Anyone with the encoded text can recover the bytes without a key.
Will this preview or open a decoded file?
No. The file is downloaded as decoded-file.bin with no preview, and the tool does not execute it.
Do files leave my browser?
No. Conversion and download creation run in this browser.

Common mistakes and limits

Sources & methodology

Related calculators