Base64 Encode & Decode
Encode text or files to Base64 and decode Base64 back to text or binary. Supports standard and URL-safe variants.
How to Use This Tool
- 1
Select the direction: Encode (text or file → Base64) or Decode (Base64 → text).
- 2
Type or paste your input into the text area, or drag and drop a file onto the drop zone.
- 3
Choose Standard or URL-safe Base64 mode depending on your use case.
- 4
The output appears instantly. Click Copy to copy it to your clipboard.
What is Base64?
Base64 is a binary-to-text encoding scheme that represents binary data using only 64 printable ASCII characters: A–Z, a–z, 0–9, +, and /. The name comes from the fact that each Base64 digit encodes exactly 6 bits of binary data. Groups of three bytes (24 bits) are converted into four Base64 characters, resulting in an encoded string that is roughly 33% larger than the original data.
The scheme was designed to safely transmit binary data through systems that were built to handle only text — such as email protocols, HTTP headers, and HTML attributes. You'll encounter Base64 everywhere: embedded images in CSS or HTML (data URIs), authentication tokens in Authorization headers, binary content in JSON payloads, and digital certificates stored in PEM files.
URL-safe Base64 is a variant that replaces + with - and / with _ so the encoded string can be used directly in URLs and filenames without percent-encoding. This is the variant used in JSON Web Tokens (JWTs) and many OAuth flows. Our encoder supports both standard and URL-safe modes so you always get the right output for your context.
Frequently Asked Questions
helpIs Base64 a form of encryption?
No. Base64 is an encoding scheme, not encryption. Anyone with a Base64 decoder can instantly recover the original data. Never use Base64 to protect sensitive information — use proper encryption for that.
helpWhat is the difference between standard and URL-safe Base64?
Standard Base64 uses + and / as the 62nd and 63rd characters, which have special meaning in URLs. URL-safe Base64 replaces them with - and _ so the encoded string can appear in a URL or filename without percent-encoding. JWTs use URL-safe Base64.
helpWhy does decoded Base64 sometimes contain garbled characters?
Base64 encodes raw bytes. If the original data was binary (an image, compressed file, etc.) rather than UTF-8 text, decoding it as text will produce unreadable characters. Use the file download option to save binary output correctly.
helpIs my data sent to a server?
No. All encoding and decoding runs locally in your browser. Your data is never uploaded anywhere.