Base64 Encode String

Enter text to encode to base64

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

https://www.php.net/manual/en/function.base64-encode.php

$string='sita.app';
$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.
https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/atob

var string='sita.app';
var base64EncodeValue = btoa(a);
console.log(base64EncodeValue);
//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;
import java.io.UnsupportedEncodingException;
public class HelloWorld {
   public static void main(String args[]) {
      try {
         // Encode using basic encoder
         String base64encodedString = Base64.getEncoder().encodeToString(
            "https://sita.app/base64-encode".getBytes("utf-8"));
         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.
or https://api.flutter.dev/flutter/dart-convert/Base64Codec-class.html

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