Base64 Encode "test"

Encode "test" to Base64. The Base64 encoded result is: dGVzdA==

Open Base64 Encoder/Decoder →

Base64 Encode: "test"

The Base64 encoded version of "test" is:

dGVzdA==

How It Works

Base64 encoding converts binary data to ASCII text using 64 characters (A-Z, a-z, 0-9, +, /).

Code Examples

// JavaScript
btoa("test");
// Output: "dGVzdA=="

# Python
import base64
base64.b64encode(b"test").decode()
# Output: "dGVzdA=="

# Command line
echo -n "test" | base64
# Output: dGVzdA==

Related Tools