Encode text or files to Base64 and decode Base64 strings back to text or binary files. Accepts URL-safe Base64, missing padding and data: URLs. Decoded images, archives and other binary data are kept intact and can be downloaded. Everything runs in your browser.
Base64 is a way to represent binary data using only 64 printable ASCII characters (A-Z, a-z, 0-9, +, /). Every 3 bytes of input become 4 characters, and = is added as padding when the input length is not a multiple of 3. It is used wherever binary data has to travel through text: email attachments, data URLs in HTML and CSS, JSON APIs, and HTTP Basic authentication headers.
This tool encodes any text or file to Base64 and decodes Base64 back to the exact original bytes.
= padding- and _ instead of + and /)data:...;base64, prefix is stripped automatically, so you can paste a data URL directly| Input | Base64 |
|---|---|
test | dGVzdA== |
Hello, World! | SGVsbG8sIFdvcmxkIQ== |
こんにちは (UTF-8) | 44GT44KT44Gr44Gh44Gv |
No. Encoding and decoding happen entirely in your browser, so it is safe to use with files you do not want to share. The current input is saved only in this browser so it is still there next time.
Paste the string (with or without the data:image/png;base64, prefix) into Encoded data, click Decode, then click the download button on Raw data.
Encoding always produces standard Base64 with +, / and padding. URL-safe input is accepted when decoding.
Base64 turns every 3 bytes into 4 characters, so the encoded text is about 33% larger than the original data. Base64 is an encoding, not compression or encryption: anyone can decode it.