Base64 Encoder & Decoder

Encoding/Decoding

Operation

Tools

File encoding

After selecting the file, it will be automatically encoded into Base64 and output in the text box on the right side of the encoding card.

Frequently asked questions

Are Base64 encoding and decoding tools safe? Will the data be uploaded to the server?

Totally safe. All Base64 encoding and decoding is done locally in your browser, and text and file content are not uploaded to any server or logged.

How much larger will the data become after Base64 encoding?

Base64 encoding increases the raw data size by approximately 33% because every 3 bytes of raw data are converted to 4 ASCII characters. For example, a 100-byte file is approximately 136 characters when encoded.

Why does decoding fail and prompt "Invalid Base64 string"?

Common causes include: mixed spaces or newlines in the string, use of URL-safe Base64 (containing - and _ characters) instead of standard Base64 (containing + and /), missing padding character = at the end. Please check and correct your input and try again.

How to Base64 encode a file?

Click "Select File" in the "File Encoding" card. After selecting any file, the tool will automatically encode it into Base64. The result is displayed in the output box on the right and can be copied and used directly.

Does Base64 encoding support Chinese and Unicode characters?

Supported. This tool will perform UTF-8 conversion before encoding to ensure that Chinese, Japanese, emoji and other Unicode characters can be correctly encoded and restored without garbled characters.

Base64 Encoder & Decoder: examples and notes

When to use it

Inspect encoded API fields or prepare Base64 test data. Base64 changes the representation of data; it does not keep the contents secret.

Try an example

Encoding Hello should produce SGVsbG8=. Decoding that result should restore the original text. Try 你好 to check a UTF-8 round trip.

Check the result

Base64 is not encryption. Standard and URL-safe Base64 use different characters. Use Image to Base64 for image data URLs, and do not assume an encoded secret is safe to publish.

Data and network notes · More tool guides

Related tools