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
How is this calculated?
Map three input bytes to four characters, or decode characters back to bytes.
Encode or decode a file
Download resultWorked 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
- Choose a conversion direction and either the standard or URL-safe alphabet. Choose Hex instead of Text if the original content is arbitrary bytes.
- 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
- Pasted text is limited to 16,000 UTF-16 code units. The file tool supports up to 2 MiB of original or decoded binary, with allowance for wrapped encoded text.
- Text decoding requires valid UTF-8. Use hex or the file tool for other bytes.
Sources & methodology
Related calculators
- URL Component Encoder and Decoder
Encode a single value or decode URL percent escapes without leaving this page. Choose form decoding only when plus signs mean spaces.
- Hexadecimal Calculator & Converter
Calculate in base 16 or convert between hexadecimal and decimal, including exact fractional values.
- Binary Calculator & Converter
Calculate in base 2 or convert between binary and decimal without rounding the internal value.