Season 1 Part of Tool Spotlight · Episode 06 of 10
View all 10 episodes →
Tool Spotlight · Episode 06 · CyberChef · Decoding · Malware Analysis · Incident Response · September 20, 2027 · 8 min read

CyberChef for Decoding and Analysing Data

Tool Spotlight · Ep 06 CyberChef Decoding Malware Analysis Incident Response · 8 min read
💬 Feedback
GCHQ
Where CyberChef was built
By an analyst in their 10% innovation time, then released as open source
0 bytes
Of your input sent to its server
All processing happens in your browser, on your own computer
Apache 2.0
The open-source licence it uses
Free to use, download and run offline on a closed network

An alert fires on a PowerShell command that ends in a long block of gibberish. A phishing email contains a link that is mostly percent signs. A log file shows a timestamp that is just a ten-digit number. None of it is hard to understand once it is decoded. The hard part is knowing which decoding to apply. CyberChef makes that fast, visual and repeatable.

Tool card What it is: a web app for encoding, decoding, converting and analysing data, billed as "The Cyber Swiss Army Knife"
Made by: GCHQ, the UK's intelligence, security and cyber agency
Cost: free and open source (Apache 2.0)
Runs in: any modern web browser, online or downloaded for offline use
Good for: decoding suspicious commands and links, extracting indicators, quick data analysis
Skill level: beginner

What CyberChef Is

CyberChef describes itself as a simple, intuitive web app for carrying out all manner of "cyber" operations within a web browser. Its README explains that it was conceived, designed and built by an analyst at GCHQ in their 10% innovation time over several years, and it is now published on GitHub under the Apache 2.0 licence.

Its key design choice matters for security work: according to the project, none of your recipe or input, text or files, is ever sent to the CyberChef web server. All processing happens in your browser, on your own computer. You can also download CyberChef and run it locally, in a virtual machine or on a closed network.

How It Works: Operations and Recipes

  • Operations are listed on the left in categories, from Base64 and hex to hashing, compression, encryption, date conversion and data extraction.
  • The recipe sits in the middle. Drag operations into it, in order, to build a chain.
  • Input goes in the top right, and the output appears below it.
  • Auto Bake runs the recipe automatically every time you change the input or the recipe, so you see results instantly.
  • Magic tries to detect which encodings your data uses. When it finds a likely decoding, a magic wand icon appears in the output, offering to apply it for you.

Recipes can be saved, and the page URL updates to include your recipe, so you can share an exact analysis with a colleague by sending a link. Be careful: if your input is in the URL too, so is your data.

CyberChef turns "what is this gibberish?" into a recipe you can save, share and run again.

Five Recipes Worth Knowing

1. Encoded PowerShell. Attackers often hide PowerShell commands with the -EncodedCommand option, which takes Base64-encoded text in UTF-16LE format. The recipe is From Base64 followed by Decode text set to UTF-16LE. Try it on this harmless example:

VwByAGkAdABlAC0ATwB1AHQAcAB1AHQAIAAnAEgAZQBsAGwAbwAgAGYAcgBvAG0AIABDAHkAYgBlAHIAIABJAG4AcwBpAGcAaAB0ACcA

It decodes to Write-Output 'Hello from Cyber Insight'. Real samples often contain another layer inside, such as more Base64 or compressed data, so keep adding operations until the output is readable.

2. Scrambled links. Phishing links are often percent-encoded to hide where they really go. URL Decode reveals them; Extract URLs pulls every link out of an email's raw source. Before sharing a suspicious link in a report or chat, run Defang URL, which turns https://evil.com into a form that cannot be clicked by accident.

3. Pulling indicators out of a mess. Paste a log file, email header or threat report, then use Extract IP addresses, Extract domains or Extract email addresses to get a clean list you can search for elsewhere, for example in your SIEM or on VirusTotal.

4. Hex, compression and XOR. Data in investigations is often stored as hex, compressed with gzip, or lightly obscured with XOR. From Hex, Gunzip and XOR handle these, and Magic can often spot the right combination for you.

5. Timestamps and hashes. From UNIX Timestamp turns a number like 1785139200 into a readable date. SHA2 and other hashing operations let you calculate a file's hash in the browser to check it against threat intelligence.

Where It Fits in an Investigation

  • Phishing triage. Decode links and attachments' embedded content while working through Playbook Monday, Episode 01.
  • Suspicious commands. Decode the command lines that Sysmon records, from Tool Spotlight, Episode 03, to see what an attacker actually ran.
  • Writing detections. Find the distinctive strings inside decoded data to use in YARA or Sigma rules, as in Tool Spotlight, Episode 05.
  • Reporting. Defang indicators before you share them, and save the recipe so others can reproduce your steps.

Using It Safely

  • Use the official version at gchq.github.io/CyberChef, or download it and run it locally. Third-party copies hosted elsewhere might not keep your data in the browser.
  • For sensitive data, run it offline on an isolated machine, as many security teams do.
  • Watch what goes in shared links. A recipe link can include your input data.
  • Never run what you decode. Decoding a malicious script is safe; copying it into a terminal is not. Read it, do not execute it.
  • Do not upload real malware files on a work machine without your organisation's agreement. Use a dedicated analysis environment.

Limits to Keep in Mind

  • It transforms data; it does not judge it. CyberChef will decode a malicious command perfectly and never warn you it is malicious.
  • Magic is a helper, not an oracle. It can miss layered or custom encodings.
  • Very large files can make the browser slow. Turn off Auto Bake for heavy work.
  • It is not a sandbox. For understanding what malware does when it runs, you need proper dynamic analysis tools.

Final Thoughts

CyberChef is the tool security people reach for dozens of times a week without thinking about it. Open it now, paste in the example above, and build the two-step recipe. Then try Magic on something you do not recognise. Within an hour you will have a toolkit that turns most "what on earth is this?" moments into a ten-second job.

Attackers hide in encoding. CyberChef takes the disguise off.

Sources and Further Reading

Cyber Insight | Tool Spotlight · Season 1

Making cybersecurity easier to understand, one issue at a time.

Season 1

Tool Spotlight · All 10 Episodes

Free and open-source security tools: what they do and where they fall short.

01
Wireshark basics for spotting suspicious traffic Episode 01 · Published
02
Have I Been Pwned and breach-monitoring tools Episode 02 · Published
03
Sysmon for endpoint visibility on Windows Episode 03 · Published
04
Nmap for checking your own network exposure Episode 04 · Published
05
YARA and Sigma rules: writing a first detection Episode 05 · Published
06
CyberChef for decoding and analysing data Episode 06 · Now reading
07
VirusTotal: using it well and its limits Episode 07 · Published
08
Process Explorer and Autoruns for finding persistence Episode 08 · Coming soon
09
OWASP ZAP for testing your own web app Episode 09 · Coming soon
10
Wazuh: open-source monitoring for a small network Episode 10 · Coming soon
PS
Poorna Sujampathi Rathnayaka
Writer · Cyber Insight · Digital Literacy

I started Cyber Insight because everywhere online people only talk about cybersecurity in technical terms — and most people are left without a proper understanding of how the digital world works. I work in cybersecurity, but I write here for everyone. No jargon. Just clear, honest explanations.