Base64 Encoder / Decoder
Encode and decode Base64 strings and files. URL-safe mode. All in your browser.
Best for developers embedding binary data in HTML/CSS data URIs, inspecting JWT tokens, or decoding Base64 API responses.
How it works
Paste or upload
Paste text into the input box, or click the file button to load a any file file.
Set options
Adjust formatting or conversion options to match your needs.
Output appears instantly
Results update as you type. Everything runs locally in your browser.
Copy or download
Copy the output to clipboard, or download it as a file.
Frequently asked questions
Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It is commonly used to embed binary data — images, files, cryptographic keys — in text formats like JSON, XML, HTML, CSS, and email.
Common use cases: embedding images directly in HTML or CSS as data URIs, attaching files in email (MIME), storing binary blobs in JSON APIs, and transmitting binary data over text-only protocols.
Standard Base64 uses + and / characters, which have special meaning in URLs. URL-safe Base64 replaces + with -, / with _, and removes the padding = characters. Use URL-safe mode when the Base64 string will appear in a URL, cookie, or JWT token.
The decoder converts a Base64 string back to its original text (UTF-8). If the input is not valid Base64, an error is shown. Common issues include missing padding (=) and characters not in the Base64 alphabet.
When decoding Base64 that originated from binary data (images, executables) rather than text, the decoded bytes may not form valid UTF-8. In that case, download the output as a file rather than copying as text.
No. Base64 is encoding, not encryption. Anyone with the encoded string can decode it instantly — it provides no confidentiality. If you need to protect data, use proper encryption (AES, etc.).
When you are in Encode mode and your input looks like a valid Base64 string (all Base64 characters, length divisible by 4), the tool suggests switching to Decode mode. This prevents accidentally double-encoding already-encoded data.