How gchq/cyberchef works
CyberChef is a browser-based data transformation workbench, with a parallel Node.js API. In the browser, an analyst supplies input, builds a recipe from searchable operations, and bakes it to view or save output; recipes can also be shared through URLs or saved locally. The core models typed data and operations, while web workers keep processing off the UI thread. The README documents broad encoding, cryptography, compression, parsing, and analysis capabilities. Some UI waiters and recipe internals were not sampled, so their detailed interactions are not expanded.
Main entry points: Manager.mjs Event Manager · api.mjs Node API · OutputWaiter.mjs Output Display · Dish.mjs Typed Data
Components 20
Browser Workbench
- Workbench UI
src/web/App.mjs - Event Manager
src/web/Manager.mjs - Recipe Editor
src/web/waiters/RecipeWaiter.mjs - Input Handling
src/web/waiters/InputWaiter.mjs - Output Display
src/web/waiters/OutputWaiter.mjs - Status Display
src/web/utils/statusBar.mjs - Worker Control
src/web/waiters/WorkerWaiter.mjs
Processing Runtime
- Bake Worker
src/core/ChefWorker.js - Recipe Executor
src/core/Chef.mjs - Recipe Model
src/core/Recipe.mjs - Operation Model
src/core/Operation.mjs - Typed Data
src/core/Dish.mjs - Data Conversion Worker
src/web/workers/DishWorker.mjs
Operation Library
- Transformations
src/core/operations - Algorithm Libraries
src/core/lib
Node Interface
- Node API
src/node/api.mjs - Node Recipe
src/node/NodeRecipe.mjs - Node Data
src/node/NodeDish.mjs
Other components
- Analyst
- Browser Local Storage
Connections 23
- Analyst → Workbench UI: uses
README.md - Workbench UI → Event Manager: initializes
src/web/App.mjs - Event Manager → Input Handling: sets up
src/web/Manager.mjs - Event Manager → Recipe Editor: initializes
src/web/Manager.mjs - Event Manager → Worker Control: sets up
src/web/Manager.mjs - Event Manager → Output Display: coordinates
src/web/Manager.mjs - Analyst → Input Handling: provides data
README.md - Analyst → Recipe Editor: builds recipe
README.md - Analyst → Output Display: views result
README.md - Analyst → Browser Local Storage: saves recipe
README.md - Worker Control → Bake Worker: dispatches bake
src/web/waiters/WorkerWaiter.mjs - Bake Worker → Recipe Executor: executes request
src/core/ChefWorker.js - Recipe Executor → Recipe Model: uses recipe model
src/core/Chef.mjs - Recipe Executor → Typed Data: uses data model
src/core/Chef.mjs - Operation Model → Typed Data: uses data model
src/core/Operation.mjs - Typed Data → Algorithm Libraries: detects file type
src/core/Dish.mjs - Output Display → Status Display: updates status
src/web/waiters/OutputWaiter.mjs - Output Display → Typed Data: converts output
src/web/waiters/OutputWaiter.mjs - Input Handling → Data Conversion Worker: requests conversion
- Node API → Node Recipe: creates recipe
src/node/api.mjs - Node API → Node Data: wraps data
src/node/api.mjs - Node Recipe → Node API: uses API utilities
src/node/NodeRecipe.mjs - Node API → Analyst: returns result