Base64 Encode Online Tool



About Base64 Encode Online Tool:

This online base64 encode tool helps you to convert one input string into a base64 format String.

Paste your Input String or drag text file in the first textbox, then press "Base64 Encode" button, and the result will be displayed in the second textbox.

comic base64 encode

Can Base64 Encode encrypt my data?

No, you can't. Base64 can change the string's appearance, but it doesn't need a password to decode the string. Base64 uses the characters A-Z, a-z, 0-9, plus '=' in the end to encode all characters within string.

Is Wordpress Rest API Authentication method (based on base64) really secure?

The WordPress REST API is enabled by default on all WordPress sites. APIs can be accessed by programs outside the site itself (such as mobile apps and RSS clients), the REST API endpoint is /wp-json/wp/v2/.

WordPress REST API can be authenticated by adding header to the http request. The auth token is based on base64:

auth_token = base64.standard_b64encode(user + ':' + password)
headers = {'Authorization': 'Basic ' + auth_token}

But wait a minute, Base64 is not an encryption method, anyone can decode a Base64 string. Does that mean the admin password is transmitted on the open Internet without encryption? so anyone can hack into the WordPress REST API? It's scary just thinking about it.

Luckily (maybe not), most website nowadays support https, which encrypt all the http request and response. And for those site does not support https, Base64 authentication method may never been used, it's totally up to the website owner.

Generally speaking, It's a bad practice to use Base64 as the authentication method, so stay away from it as far as possible!!!

Does Base64 Encode Online Tool log my data?

Absolutely NOT, this Base64 Encode doing all the formatting work on the client side, all logic are implemented by Javascript. There are 2 major advantages: 1.Your data never transmitted in the Open Internet, so you know it's secure; 2.It's much faster than doing all the work in the server side, because there is no Internet Delay.

More information about Base64:

RFC 3548: https://tools.ietf.org/html/rfc3548.html

Python Implementation of Base64: https://docs.python.org/2/library/base64.html

Java Implementation of Base64: https://docs.oracle.com/javase/8/docs/api/java/util/Base64.html

Base64 Encode with Python (with package base64):

import base64

def base64_encode(str):
    return base64.b64encode(str.encode())
    

Base64 Encode with Java (with package MessageDigest):

import java.util.Base64;

public String encode(String str)  {
    byte[] encodedBytes = Base64.getEncode().encode(str.getBytes());
    String text = new String(encodedBytes);
    return text;
}