Base64 Encode online

This tool helps you to convert a text or a number to Base64

Enter a string then convert to base64

Base64 is an encoding technique used to represent binary data as a sequence of ASCII characters. It is commonly used to store data in databases and to embed binary data, such as images, into HTML and XML documents.

The “Base64 Encode” tool on the website makes it easy to quickly and securely encode any text as base64. This tool is an invaluable asset for developers, who often need to store binary data in databases or embed it in HTML or XML documents.

The Base64 Encode tool is simple to use. All the user has to do is enter the text they want to encode in the text box, then press the “Encode” button. The tool will then generate a base64 encoded version of the text and display it in the output box.

Encodes data with MIME base64

The tool supports encoding any text to base64 code, the way to use is very simple, you just need to enter text and press the button to get the results.

Base64 encode in Php

$base64EncodeValue = base64_encode($string);
echo $base64EncodeValue;
//output: c2l0YS5hcHA=

See also base64 decode in php

Base64 encode in javascript

this is source code simple base64 encode for javascript or nodejs.

var string='';
var base64EncodeValue = btoa(a);
//output: c2l0YS5hcHA=

See also base64 decode in javascript

Base64 encode in JAVA

This is source code simple base64-encoder for java

import java.util.Base64;
import java.util.UUID;
public class HelloWorld {
   public static void main(String args[]) {
      try {
         // Encode using basic encoder
         String base64encodedString = Base64.getEncoder().encodeToString(
         System.out.println("Base64 Encoded String :" + base64encodedString);
         //output: aHR0cHM6Ly9zaXRhLmFwcC9iYXNlNjQtZW5jb2Rl
      } catch(UnsupportedEncodingException e) {
         System.out.println("Error :" + e.getMessage());

Base64 encode in Dart

This is source code simple base64-encoder for dart.
Dart has a function in the package:crypto library, CryptoUtils.bytesToBase64, which takes a list of bytes to encode as base64.

import 'dart:convert';
import 'package:crypto/crypto.dart';
main() {
  var str = "";
  var bytes = UTF8.encode(str);
  var base64 = CryptoUtils.bytesToBase64(bytes);