Base64 Encoder/Decoder
Base64 is an encoding scheme for representing binary data in text format. It uses 64 characters (A-Z, a-z, 0-9, +, /) to represent data. This tool allows you to encode text data to Base64 format or decode Base64 data to text. You can process data up to 5120 characters.
Data to encode
Result
Read Only
How to use
About this tool
Encodes text to Base64 and decodes Base64 to text. All processing in the browser.
How to use
Switch encode/decode, type or paste in the text field. Results update in real time; copy as needed.
Options
Direction: Switch between Encode (text→Base64) and Decode (Base64→text).
Use cases
• Data URIs • Obfuscating strings (note: Base64 is not encryption) • Basic auth • Representing small binaries as text
Code Examples
JavaScript
Read Only
1// Encode
2btoa("Hello"); // "SGVsbG8="
3
4// Decode
5atob("SGVsbG8="); // "Hello"
6
7// Node / Unicode: Buffer.from(str).toString("base64")Python
Read Only
1import base64
2
3base64.b64encode(b"Hello").decode() # "SGVsbG8="
4base64.b64decode("SGVsbG8=").decode() # "Hello"PHP
Read Only
1base64_encode("Hello"); // "SGVsbG8="
2base64_decode("SGVsbG8="); // "Hello"Privacy and data
Encoding and decoding happen in the browser; input is never sent to a server.
