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.
FAQ
- Q: What is Base64 encoding?
- A: Base64 is an encoding scheme that represents binary data as ASCII text using 64 characters (A-Z, a-z, 0-9, +, /). It is commonly used for Data URIs, Basic Auth headers, and embedding binary data in JSON or XML.
- Q: Is Base64 a form of encryption?
- A: No. Base64 is encoding, not encryption. It can be decoded by anyone without a key. Do not use Base64 to protect sensitive data; use proper encryption instead.
- Q: What is the difference between standard Base64 and URL-safe Base64?
- A: Standard Base64 uses + and / characters, which have special meaning in URLs. URL-safe Base64 replaces + with - and / with _, making it safe for use in URLs and filenames without percent-encoding.
- Q: Is any data sent to a server?
- A: No. All encoding and decoding happens entirely in your browser. Your input is never sent to any server.
