Base64 Encode & Decode
Convert between text and Base64 encoding. Real-time conversion.
How to Encode and Decode Base64 Online
Convert text or files to Base64 — and decode Base64 strings back to their original form.
Enter Text or Upload a File
Type or paste text into the input area, or upload a file (image, PDF, etc.) to convert its binary content to a Base64 string.
Choose Encode or Decode
Click Encode to convert your input to Base64, or Decode to convert a Base64 string back to plain text or downloadable binary.
View the Result
The encoded or decoded output appears instantly. For file conversions, the result shows the data URI or binary preview.
Copy or Download
Copy the Base64 string to your clipboard for use in code, or download the decoded binary file if you decoded a file-based string.
Why Use Base64 Encoding?
Base64 is the standard way to transport binary data through text-based systems.
Embed Images in HTML/CSS
Convert small images to Base64 data URIs to embed them directly in HTML or CSS — eliminating an extra HTTP request per image.
API Payloads
Many REST APIs require file attachments as Base64 strings in JSON bodies. Encode your files here before including them in API requests.
Authentication Headers
Basic Auth credentials ("username:password") and JWT tokens are Base64-encoded. Decode them here to inspect their contents during debugging.
100% Private
All encoding and decoding runs locally in your browser. Sensitive strings — credentials, tokens, file contents — never leave your device.
Frequently Asked Questions
No — Base64 is an encoding scheme, not encryption. It transforms binary data into ASCII text for transport but provides no confidentiality. Anyone who has the Base64 string can decode it instantly. For actual security, use proper encryption algorithms, not Base64.
Base64 encoding increases the size of the original data by approximately 33–36%. For example, a 100KB image becomes roughly 133KB when encoded as Base64. This overhead is why Base64 is best suited for small files or inline resources.
Standard Base64 uses "+" and "/" characters which have special meaning in URLs. URL-safe Base64 replaces these with "-" and "_" to make the string safe for use in URLs and filenames without percent-encoding.