Online Base64 Encoder & Decoder

Encode and decode Base64 text or files — all processed privately in your browser

Ready Input: 0 | Output: 0

Use this free online Base64 encoder and decoder to convert text and files to and from Base64 format. Type or paste text, upload a file, select Encode or Decode, and get instant results—all processed locally in your browser with no uploads.

  1. Type or paste text into the Input panel
  2. Select Encode in the toolbar (it's the default mode)
  3. Your Base64-encoded output appears instantly in the Output panel
  4. Click Copy Output to copy the result, or Save Output to download it as a .b64 file

The encoder supports all text characters, including Unicode, emoji, and special characters. It uses standard Base64 encoding (RFC 4648).

  1. Paste your Base64 string into the Input area
  2. Select Decode in the toolbar
  3. The decoded text appears automatically in the Output panel
  4. Use Copy Output or Save Output to export the result as a .txt file

If the Base64 string is invalid or corrupted, the tool will display an error message in the status bar to help you identify the issue.

You can encode any file to Base64 by clicking the Open File button and selecting a file. The tool reads the file content locally and converts it to Base64 without uploading anything to a server. This is useful for:

  • Embedding images in HTML/CSS: Convert images to Base64 data URIs for inline use
  • API requests and responses: Transfer binary data through JSON or XML payloads
  • Configuration files: Store small files as Base64 strings in environment variables or config files
  • Email attachments: Encode files for MIME email protocols

You can also decode Base64-encoded files back to their original binary form and save them using the Save Output button.

Base64 encoding converts binary data into ASCII text, making it safe to transmit through systems that only support text. Common scenarios include:

  • Web development: Embedding small images, fonts, or icons inline in HTML or CSS using data URIs (e.g., data:image/png;base64,...)
  • API integration: Transferring binary data like images or PDFs through JSON or XML APIs that don't support binary uploads
  • Authentication: Encoding credentials in HTTP Basic Authentication headers
  • Data storage: Storing small files or binary blobs as text strings in databases, environment variables, or configuration files
  • Email systems: Encoding attachments in MIME-formatted emails
  • Debugging: Analyzing API requests or responses that contain Base64-encoded payloads

All encoding and decoding happens directly in your browser using JavaScript's native btoa() and atob() functions. Your files and text are not uploaded to a server or stored by LeanTul, making this tool suitable for sensitive data like configuration files, private documents, authentication tokens, and API payloads.

Important: Base64 is an encoding format, not encryption. It does not provide any security or confidentiality. Anyone can decode Base64 strings instantly, so never rely on Base64 encoding alone to protect sensitive information. Use proper encryption methods (like AES, RSA, or HTTPS) for security-critical data.

Interested in more encoding tools? Try the JSON Formatter for formatting and validating JSON data, or the Text Case Converter for text transformations.

Does this tool upload my text or files?

No. All Base64 encoding and decoding happens directly in your browser using JavaScript. Your text and files never leave your device and are not uploaded or stored by LeanTul.

Can I convert files to Base64?

Yes. Click the Open File button to encode any file into a Base64 string. The file is read locally in your browser and converted without any server uploads. This is useful for embedding files in code, APIs, or configuration systems.

Can I decode Base64 back into a file?

Yes. Paste the Base64 string into the Input area and click Decode. Then use Save Output to download the reconstructed file. The tool automatically generates appropriate file extensions based on the mode (.b64 for encoded, .txt for decoded).

Is Base64 encryption?

No. Base64 is an encoding format, not encryption. It simply converts binary data into ASCII text for safe transmission through text-based systems. Anyone can instantly decode Base64 strings, so it provides no security or privacy protection. Use proper encryption (like AES or RSA) for sensitive data.