ChaCha20 Encryption
Developer & Author —Egor VolchenkoThis ChaCha20 encryption tool encrypts pasted text or encoded bytes using a raw key and displays a complete payload as Hex or Base64. This plain stream-cipher operation does not authenticate the message. The IV / Nonce field is shared UI; the operation generates its own prefix rather than using that field.
How to use ChaCha20 Encryption
Use the following steps to process a small test input.
Encrypt a ChaCha20 test message
- Paste the message into Plaintext. Set Input Encoding: to UTF-8 for normal text or the representation of source bytes.
- Enter the same 32-byte UTF-8 key in Encryption Key / Password. This form has no separate key-encoding or password-derivation selector.
- Select Hex (lower), Hex (UPPER), or Base64. Leave IV / Nonce (Optional / Auto-generated) blank: its typed value is ignored. The operation generates and embeds its own prefix.
- Leave Auto / Live on for updates, or turn it off and click Encrypt.
- Read Encrypted Ciphertext (Base64). Keep the complete encoded value, including its prefix.
- Click Copy to copy the result. Use Clear where shown, or the field clear controls, to remove the text.
For UTF-8 plaintext hello and key 0123456789abcdef0123456789abcdef, one verified Hex payload is 812100192a74c032ee458b8d145eb3c68f55cd85b2. A new run normally produces different bytes because the prefix is generated again. The matching decryption operation restores hello. This key is public test data.
A rejected request may leave an earlier result visible. Clear the fields and recheck the input before relying on a new calculation.
Match the payload layout
This operation expects a 16-byte initial-state prefix followed by ciphertext. This is the OpenSSL-style ChaCha20 layout with a 16-byte initial state, not a bare IETF 12-byte-nonce packet. No XChaCha20 or initial-counter setting is exposed.
Treat the key as bytes
Encryption Key / Password is interpreted as UTF-8 text, even if it looks like Hex or Base64. Internally, shorter keys are zero-padded and longer keys are truncated to 32 bytes; this does not provide password stretching. Use an exact 32-byte test key when comparing results. The fixed output label can still say Base64 when Hex is selected.
Frequently asked questions
The visible IV / Nonce (Optional / Auto-generated) field is ignored by this operation. Encryption generates the prefix; decryption reads it from the payload.
API — ChaCha20 Payload Encryptor
Automate this tool directly from your scripts, CI/CD pipelines, or backend applications via HTTP POST.
https://million.tools/api/v1/run/chacha20-encrypt Request Parameters (JSON / Form Data)
-
input_encodingInput Encoding
hexhex_ignore_non_hexbase64utf-8utf-16leutf-16bewindows-1251windows-1252 -
start(orinput)Plaintext
-
hmac_keyEncryption Key / Password
-
cipher_ivIV / Nonce (Optional / Auto-generated)
-
output_formatOutput encoding format
hexhex_upperbase64
curl -X POST https://million.tools/api/v1/run/chacha20-encrypt \
-H "Content-Type: application/json" \
-d '{"start":"Hello, million.tools!","hmac_key":"0123456789abcdef0123456789abcdef","output_format":"base64"}' const response = await fetch('https://million.tools/api/v1/run/chacha20-encrypt', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
"start": "Hello, million.tools!",
"hmac_key": "0123456789abcdef0123456789abcdef",
"output_format": "base64"
}),
});
const data = await response.json();
console.log(data.result); import requests
response = requests.post(
'https://million.tools/api/v1/run/chacha20-encrypt',
json={
"start": "Hello, million.tools!",
"hmac_key": "0123456789abcdef0123456789abcdef",
"output_format": "base64",
},
timeout=15,
)
data = response.json()
print(data['result']) $ch = curl_init('https://million.tools/api/v1/run/chacha20-encrypt');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'start' => 'Hello, million.tools!',
'hmac_key' => '0123456789abcdef0123456789abcdef',
'output_format' => 'base64',
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
echo $response['result'] ?? ''; {
"status": "success",
"tool": "chacha20-encrypt",
"service": "chacha20_encrypt",
"result": "Mg8vNa/STd0gxYkmhzApcH4MTj/ZGub0maKgfHomV1Cml7Wbbg==",
"results": {
"result": "Mg8vNa/STd0gxYkmhzApcH4MTj/ZGub0maKgfHomV1Cml7Wbbg=="
}
}
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.