How to Encrypt Data with CyberChef
Updated
To encrypt data with CyberChef, open the web app, add an encryption operation (for example AES Encrypt or XOR) to the Recipe, set the input format and key parameters, then run the recipe and read the result in the Output pane. This works for quick, browser-based encryption of text or small data blobs; it is not a substitute for a managed key store or a full application crypto library.
Before you start
- CyberChef runs entirely in the browser, so your input stays on your machine unless you paste it elsewhere.
- Decide what you are protecting and why. CyberChef is a data-manipulation tool, so treat any key you type as sensitive.
- Know your input's current format. If the data is already Base64 or Hex, say so in the Input pane before adding the encryption operation, otherwise CyberChef treats it as raw text.
Step-by-step: encrypt with AES
1. Load the input
Paste your plaintext into the Input pane. In the Input pane's format selector, choose the format that matches what you pasted — typically UTF-8 for normal text.
2. Add the encryption operation
Search the Operations list for AES Encrypt and drag it into the Recipe column. The operation's arguments appear in the Recipe area.
3. Configure the key and parameters
Fill in the operation arguments:
| Argument | What to set |
|---|---|
| Key | Your secret key, in the format the operation expects (often UTF-8 or Hex) |
| IV | The initialization vector, if the selected mode requires one |
| Mode | The block mode, e.g. CBC or ECB |
| Input / Output | The data format for the key and the resulting ciphertext |
If the key format and the key value disagree — for example a Hex key field containing non-hex characters — the operation will fail or produce garbage.
4. Run the recipe
The Output pane updates as you build the recipe. Confirm the output looks like ciphertext (Base64 or Hex, depending on the output format you chose) rather than readable text.
5. Verify by decrypting
Add AES Decrypt after the encrypt operation, or build a second recipe, and feed the ciphertext back in with the same key, IV, and mode. If the round trip returns your original plaintext, your settings are consistent. If it returns gibberish, one of the parameters differs between the two operations.
Choosing an operation
- AES Encrypt — standard symmetric encryption; use when you need a well-known block cipher and can manage key and IV correctly.
- XOR — simple byte-wise operation with a repeating key; useful for obfuscation and CTF-style tasks, not for protecting real secrets.
- Other operations — CyberChef's operation list covers many ciphers and encodings. Pick the one that matches the algorithm your receiving system expects, since the ciphertext must be decryptable on the other end.
Common problems
- Wrong key length. AES expects specific key sizes (128, 192, or 256 bits). A short passphrase must be hashed or padded to the right length first.
- Encoding mismatch. If the key is entered as UTF-8 but the operation expects Hex (or vice versa), the derived key is wrong and decryption fails.
- Missing or reused IV. Modes like CBC need a unique IV per message; omitting it or reusing it weakens the result.
- Garbled output. Usually means the key, IV, mode, or input format differs from what the decrypting side uses.
- Confusing encoding with encryption. Base64 and Hex only change representation; they provide no confidentiality. Use an actual cipher operation when secrecy matters.
When to use CyberChef for this
CyberChef is a good fit for one-off encryption, testing a cipher configuration, or inspecting how a pipeline behaves. For production systems, use a vetted crypto library or key-management service instead, and never paste real production keys into a tool you do not control.