ChaCha20 Encryption & Decryption

Encrypt or decrypt text and files using the IETF ChaCha20 stream cipher.



How to use

Leave the nonce blank when encrypting to generate one. Save it and the counter for decryption. Each encryption with a given key needs a fresh nonce.

FAQ

Where is the ChaCha20 nonce generated?

When you leave the nonce blank during encryption, the browser fills it in locally. The key, nonce and input stay in the browser during the operation.

What is supported?

Use a 32-byte Hex key, a 12-byte Hex nonce and an initial counter from 0 to 4294967295. Files are limited to 8 MiB. This mode has no authentication tag.

Other Languages

ChaCha20 Encryption & Decryption — Base64.sh

ChaCha20 Encryption & Decryption

Encrypt or decrypt text and files using the IETF ChaCha20 stream cipher.

Share:

References

How we make sure

We check this tool with the automated test suites linked below. Example checks are shown in their original language.

Verification method
Compare ciphertext with Node ChaCha20 using the same 32-byte key, 12-byte nonce and explicit counter 1.
Comparison reference
Node.js 24.22.1 crypto (OpenSSL 3.5.9) chacha20 versus @noble/ciphers 2.4.0.
Verification scope
Covers IETF ChaCha20 ciphertext with a fixed key, nonce and initial counter. Other counter values are outside this comparison.
Test source and cases (select a file to read it)
  • completion-tools.test.js
    • chacha20-cipher: ciphertext matches Node OpenSSL with explicit counter
    • Secret fields start empty and fixed vectors are confined to the explicit example action

These checks cover the listed examples and boundaries, not every possible input. Round trips and checks using the same library are not independent verification.