Convert text and files to Base64 format and vice versa. Secure, fast, and 100% client-side.
The Base64 Encoder & Decoder is a powerful tool allowing you to convert text and files into Base64 format and back, directly within your browser. No software installation or account required.
All processing happens locally on your device via JavaScript. Your data is never sent to our servers, ensuring maximum privacy for sensitive information like API keys or private data.
Base64 is a binary-to-text encoding scheme that converts arbitrary binary data into a subset of ASCII characters. It is widely used to safely transmit binary content (images, files, keys) through text-only channels like email or JSON APIs. encrypt text with AES for secure storage
The name "Base64" comes from the 64-character alphabet used: A-Z, a-z, 0-9, +, and /. Each 3 bytes of input become 4 Base64 characters, resulting in approximately 33% size overhead. convert between JSON, CSV, XML and more
Select "Encode" to convert plain text or binary content to Base64, or "Decode" to reverse a Base64 string back to its original form.
Type or paste your text, or upload a file. Text encoding works directly; binary file encoding uses the FileReader API in-browser.
Copy the result to clipboard with one click, or download it as a .txt file. No server involved — processing is 100% local.
Hello, CharCount! 🔐
SGVsbG8sIENoYXJDb3VudCEg8J+Qkw==
Use encoding when you need to embed binary data in a text-safe format: embedding images in CSS/HTML, storing binary blobs in JSON, or passing data through a URL parameter.
Use decoding when you receive a Base64 string from an API, an email attachment header, or a config file and need to inspect or use the original content.
Standard Base64 uses "+" and "/" which are reserved characters in URLs. URL-safe mode replaces them with "-" and "_", making the output safe for use in URLs, query parameters, and JWT tokens without encoding.
Toggle "URL Safe" mode in the options bar before encoding to get a URL-ready Base64 string every time.
A critical misconception: Base64 is NOT a security measure. Anyone can decode a Base64 string in seconds. Never use it to "hide" passwords, API keys, or sensitive data.
For security, use proper encryption (AES, RSA) or hashing (bcrypt, SHA-256). Base64 is purely for safe text transport of binary data.
Need to embed a small image in a CSS file or send a PDF through a JSON API? Upload a file and get its complete Base64 string representation instantly.
Supports any file type. Larger files (5MB+) may take a moment to process. The output is a pure ASCII string ready to paste anywhere.
Base64 uses 64 printable ASCII characters: uppercase A-Z (26), lowercase a-z (26), digits 0-9 (10), and two special chars (+ and /). The "=" padding character aligns the output to block boundaries.
This tool uses the browser-native btoa() and atob() APIs for standard encoding and decoding, ensuring cross-platform reliability.
Forgetting padding "=" at the end — base64 strings must have a length divisible by 4.
Using standard Base64 in URLs — always switch to URL-safe mode to avoid percent-encoding issues.
Treating Base64 as encryption — it provides zero security, only encoding.
Paste your text or upload a file above — results appear immediately. Free, private, browser-only.
Encode / Decode Now