An encoded message can have several layers. CyberChef is a browser application for applying named operations to data. Its input area holds the starting data, its output area shows the result, and its recipe is the ordered list of operations between them. Each operation receives the preceding operation’s output.
Here you will read two encoding operations, From Base64 and From Hex. Encoding changes representation; it does not supply a secret key or establish confidentiality. A recipe that produces readable words shows a plausible transformation, not who created the input or whether it is trustworthy. Use only the supplied fictional strings.
Before you begin
- Recommended first
- The rule for every tool from here on, curl, and one HTTP request from Python, Snapshots, and how to undo a bad experiment, Browser developer tools
- Estimated time
- 15 min reading, 12 min activity. Setup and optional practice may take longer.
- Where you work
- Use the printed examples in any desktop or mobile browser, with paper or a text editor. No installation, account, proxy, certificate or scan is required. Ubuntu is sufficient for later practice; optional setup time is outside these estimates.
- Without a lab
- All evidence needed for the activity appears on this page. Copy it into notes if downloads are unavailable. Read the labeled model and predict each result; a paper trace practises the reasoning while tool operation waits for a lab. Reading needs no JavaScript. Answer checking needs JavaScript and a secure context; saving progress also needs usable browser storage.
After this lesson you can:
- Explain how each recipe step receives the previous result.
- Use the supplied byte pairs to trace a one-layer input.
- Choose an initial operation from declared provenance.
01Example
Authored two-layer example. The predictions follow the declared encodings; they are not a new CyberChef session.
Input: NmU2Zjc0NjU=
From Base64 → 6e6f7465
From Hex → note
Order matters: Base64 is the outside layer; hex is inside it.02Outside layer first
Hex uses pairs of digits 0–9 and a–f to represent bytes. Standard Base64 uses letters, digits, + and /, with = sometimes added as padding. These shapes suggest possible formats; provenance, the record of how the data was made, is stronger evidence. A string can fit more than one alphabet.
For the declared worked input, removing Base64 exposes hex text. The next step interprets those pairs as bytes and the bytes as readable ASCII. From Hex first would apply the wrong interpretation to the outer string. CyberChef’s Magic feature suggests interpretations; record the actual operations and settings rather than treating a suggestion as proof. Auto Bake can run a changed recipe automatically, so keep personal or secret material out of experimental inputs.
Choose transformations in the order that removes the outside layer first, and record a repeatable recipe.Model. A teaching model drawn by hand. It shows the idea, not real tool output.
Read the full explanation below.
Playback is optional. Step through at your own pace.
Original input
NmU2Zjc0NjU=encoded inputAfter From Base64
6e6f7465hex textWrong order: From Hex first is a mismatch for this input.limitAfter From Hex
noteASCII readingNmU2Zjc0NjU= → 6e6f7465From Base64 first
Base64 is the outside layer.
Follow the explanation
- Base64 is the outside layer.
- Then hex maps to note; keep the original input.
- Wrong order is a labeled mismatch, not an alternate output.
Read every state and value
1. Base64 is the outside layer.
- Example
- Supplied teaching sample
- Visible Item
- NmU2Zjc0NjU= · 6e6f7465
- Current mappings
- From Base64 first
- Annotations
- None
2. Then hex maps to note; keep the original input.
- Example
- Supplied teaching sample
- Visible Item
- NmU2Zjc0NjU= · 6e6f7465 · note
- Current mappings
- From Base64 first · From Hex second
- Annotations
- None
3. Wrong order is a labeled mismatch, not an alternate output.
- Example
- Supplied teaching sample
- Visible Item
- NmU2Zjc0NjU= · 6e6f7465 · note · Wrong order: From Hex first is a mismatch for this input.
- Current mappings
- None
- Annotations
- Item: Wrong order: From Hex first is a mismatch for this input.; Text: No transform was executed.
03Decode the activity input
The guided input is 6c616e65. Its provenance says one hex layer representing ASCII text. Trace it on paper; opening CyberChef later is optional.
Encoding card. Python's standard library encoded these strings while the card was written.
Nothing below is an observed CyberChef result.
Alphabets, reused from Stage 04
Hex digits are 0-9 and a-f.
Standard Base64 uses A-Z, a-z, 0-9, +, /, and = for padding.
Worked input
NmU2Zjc0NjU=
Outer layer: Base64 of the hex text 6e6f7465
Those hex digits are the ASCII bytes of: note
Recipe order for this input: From Base64, then From Hex
Predicted output: note
Activity input
6c616e65
The characters are hex digits, and the length is even.
One operation: From Hex
Predicted output: lane
ASCII map for the activity: 6c=l, 61=a, 6e=n, 65=e.
Use the map to check your one-layer prediction.
Field input
NjQ2NTczNmI=
This string is Base64 of hex text.
It contains = and letters outside the hex digits.
Authored recipe note. Not a file saved by CyberChef.
Argument fields were not verified against a CyberChef build.
Name: desk-note-worked
Input: NmU2Zjc0NjU=
Step 1: From Base64
Step 2: From Hex
Predicted output: note
This recipe does not use Magic. A Magic suggestion would be a hypothesis until the steps are written down.
Name: desk-note-activity
Input: 6c616e65
Step 1: From Hex
Predicted output: lane
Independent input: NjQ2NTczNmI=, declared Base64 of hex text.
- Split the input into pairs: 6c 61 6e 65. Each pair represents one byte.
- Use the supplied ASCII mapping: 6c means l, 61 means a, 6e means n and 65 means e. Write the operation that interprets these pairs.
- Compare your prediction with lane. Record input, From Hex and that output in order; a second decoding operation is unnecessary.
- Stop with the written recipe. In a later optional browser run, use only these strings and the named local transforms; do not add a network-fetch operation.
04Optional challenge
Spend about ten optional minutes explaining why reversing the two worked operations fails. Name the visible outer representation and the representation expected by each operation. Your explanation should describe the mismatch rather than relying on an error message from a particular build.
05Fresh cases for the checks
Use these fictional cases for the checks below. They have different inputs from the worked examples. Read them here or make notes; no installation or external service is needed.
Recipe case A: declared encoding provenanceOwned fixture. An original file made for this course. Follow the activity's instructions in your own lab.
The input is Base64 of hex text.
Input: Nzc2MTc2NjU=
Supplied transformation map: From Base64(Nzc2MTc2NjU=) = 77617665
ASCII byte map: 77=w, 61=a, 76=v, 65=e.
Read these maps as authored predictions, not a CyberChef run.
Recipe case B: independent one-layer inputOwned fixture. An original file made for this course. Follow the activity's instructions in your own lab.
Provenance: plain ASCII bytes represented once in hex.
Input: 70696e
ASCII map: 70=p, 69=i, 6e=n.
No Base64 layer is present.
06Explain your evidence
Optional written self-check: explain one decision using the supplied case. No tool run is required.
Check your explanation: name the declared outer layer; trace each intermediate representation; record operation order and exact input; explain why readability does not establish origin or confidentiality.
07Common mistakes
If the guided answer is note, compare the input: note belongs to NmU2Zjc0NjU=, while this activity begins with hex 6c616e65.
If a string looks like hex but has no provenance, record that as a hypothesis. Do not infer an algorithm or meaningful message from alphabet alone.
If a suggested recipe works, write down its steps and settings. Output without that record is harder to reproduce.
References
- CyberChef README
Official explanation of recipes and encoding operations.
- CyberChef official app
Official explanation of recipes and encoding operations.
- RFC 4648: Base16, Base32, and Base64
Sections 3–4 define padding and the standard Base64 alphabet.