Base64 Encode
Developer & Author —Egor VolchenkoBase64 Encode represents text or entered bytes as a standard Base64 string. Use this Base64 encoder to prepare test data for a field that expects Base64. Input Encoding: controls which bytes are encoded, so the same visible characters can produce different results under different settings.
How to use Base64 Encode
Follow these steps to check the input and read the result.
Encode text as standard Base64
- Type or paste the text or byte representation you want to encode into Plain Text String.
- Set Input Encoding: to UTF-8 for ordinary text. Choose Hex for entered hexadecimal bytes, or Base64 when the input already represents Base64-encoded bytes.
- Keep Auto / Live on to update the result as you edit. To process it manually, turn Auto / Live off and click Run.
- Read Base64 Encoded Result and check the result before using it.
- Click Copy to copy the result. Use Clear where shown, or a field’s clear control, to clear the text before starting again.
With Input Encoding: set to UTF-8, Hello produces SGVsbG8=. With Hex selected, 48656c6c6f produces the same result.
Choose bytes before choosing a representation
UTF-8 converts the entered characters to bytes before Base64 encoding. Hex 48656c6c6f represents the bytes of Hello; the same digits under UTF-8 represent ten text characters. Additional text encodings are available in Input Encoding: for compatibility testing.
Use standard output in the correct context
Output uses the standard Base64 alphabet and padding where needed. It is not automatically URL-safe, and the form has no output variant selector, file upload, or MIME line-wrapping control.
Encode bytes from Hex
Use the input selector when you already have a byte representation rather than plain text.
- Choose Hex in Input Encoding:.
- Enter 48656c6c6f in Plain Text String.
- Keep Auto / Live on or click Run, then copy SGVsbG8= from Base64 Encoded Result.
Frequently asked questions
No. Base64 is encoding, not encryption. It changes the representation of bytes without a secret key and can be decoded by anyone.
API — Text to Base64
Automate this tool directly from your scripts, CI/CD pipelines, or backend applications via HTTP POST.
https://million.tools/api/v1/run/base64-encode Request Parameters (JSON / Form Data)
-
start(orinput)Plain Text String
-
input_encodingInput Encoding
hexhex_ignore_non_hexbase64utf-8utf-16leutf-16bewindows-1251windows-1252
curl -X POST https://million.tools/api/v1/run/base64-encode \
-H "Content-Type: application/json" \
-d '{"start":"foobar"}' const response = await fetch('https://million.tools/api/v1/run/base64-encode', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
"start": "foobar"
}),
});
const data = await response.json();
console.log(data.result); import requests
response = requests.post(
'https://million.tools/api/v1/run/base64-encode',
json={
"start": "foobar",
},
timeout=15,
)
data = response.json()
print(data['result']) $ch = curl_init('https://million.tools/api/v1/run/base64-encode');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'start' => 'foobar',
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
echo $response['result'] ?? ''; {
"status": "success",
"tool": "base64-encode",
"service": "base64_encode",
"result": "Zm9vYmFy",
"results": {
"result": "Zm9vYmFy"
}
}
Hi! I’m a WordPress developer with over 10 years of experience. I love Tailwind CSS, clean code, and intuitive interfaces. I’m currently working on million.tools — a service with convenient online tools for everyday tasks. I’m building it from scratch with great attention to detail and user experience.
Ratings & feedback 0
Share your experience with this tool.
No feedback yet
Be the first to leave a review or rating.