Code
23 operations. Call any of them with cyberchef_bake, or pre-load them
with CYBERCHEF_TOOL_SURFACE=all.
CSS Beautify
Section titled “CSS Beautify”Indents and prettifies Cascading Style Sheets (CSS) code.
- Tool name:
cyberchef_css_beautify - Input / output:
string→string
| Argument | Type | Default |
|---|---|---|
indent_string |
binaryShortString | \t |
CSS Minify
Section titled “CSS Minify”Compresses Cascading Style Sheets (CSS) code.
- Tool name:
cyberchef_css_minify - Input / output:
string→string
| Argument | Type | Default |
|---|---|---|
preserve_comments |
boolean | false |
CSS selector
Section titled “CSS selector”Extract information from an HTML document with a CSS selector
- Tool name:
cyberchef_css_selector - Input / output:
string→string
| Argument | Type | Default |
|---|---|---|
css_selector |
string | — |
delimiter |
binaryShortString | \n |
From MessagePack
Section titled “From MessagePack”Converts MessagePack encoded data to JSON. MessagePack is a computer data interchange format. It is a binary form for representing simple data structures like arrays and associative arrays.
- Tool name:
cyberchef_from_messagepack - Input / output:
ArrayBuffer→JSON - Arguments: none
Generic Code Beautify
Section titled “Generic Code Beautify”Attempts to pretty print C-style languages such as C, C++, C#, Java, PHP, JavaScript etc.This will not do a perfect job, and the resulting code may not work any more. This operation is designed purely to make obfuscated or minified code more easy to read and understand.Things which will not work properly:For loop formattingDo-While loop formattingSwitch/Case indentationCertain bit shift operators
- Tool name:
cyberchef_generic_code_beautify - Input / output:
string→string - Arguments: none
JavaScript Beautify
Section titled “JavaScript Beautify”Parses and pretty prints valid JavaScript code. Also works with JavaScript Object Notation (JSON).
- Tool name:
cyberchef_javascript_beautify - Input / output:
string→string
| Argument | Type | Default |
|---|---|---|
indent_string |
binaryShortString | \t |
quotes |
option | Auto |
semicolons_before_closing_braces |
boolean | true |
include_comments |
boolean | true |
JavaScript Minify
Section titled “JavaScript Minify”Compresses JavaScript code.
- Tool name:
cyberchef_javascript_minify - Input / output:
string→string - Arguments: none
JavaScript Parser
Section titled “JavaScript Parser”Returns an Abstract Syntax Tree for valid JavaScript code.
- Tool name:
cyberchef_javascript_parser - Input / output:
string→string
| Argument | Type | Default |
|---|---|---|
location_info |
boolean | false |
range_info |
boolean | false |
include_tokens_array |
boolean | false |
include_comments_array |
boolean | false |
report_errors_and_try_to_continue |
boolean | false |
JPath expression
Section titled “JPath expression”Extract information from a JSON object with a JPath query.
- Tool name:
cyberchef_jpath_expression - Input / output:
string→string
| Argument | Type | Default |
|---|---|---|
query |
string | — |
result_delimiter |
binaryShortString | \n |
JSON Beautify
Section titled “JSON Beautify”Indents and pretty prints JavaScript Object Notation (JSON) code.Tags: json viewer, prettify, syntax highlighting
- Tool name:
cyberchef_json_beautify - Input / output:
string→html
| Argument | Type | Default |
|---|---|---|
indent_string |
binaryShortString | `` |
sort_object_keys |
boolean | false |
formatted |
boolean | true |
JSON Minify
Section titled “JSON Minify”Compresses JavaScript Object Notation (JSON) code.
- Tool name:
cyberchef_json_minify - Input / output:
string→string - Arguments: none
Jsonata Query
Section titled “Jsonata Query”Query and transform JSON data with a jsonata query.
- Tool name:
cyberchef_jsonata_query - Input / output:
string→string
| Argument | Type | Default |
|---|---|---|
query |
text | string |
Render Markdown
Section titled “Render Markdown”Renders input Markdown as HTML. HTML rendering is disabled to avoid XSS.
- Tool name:
cyberchef_render_markdown - Input / output:
string→html
| Argument | Type | Default |
|---|---|---|
autoconvert_urls_to_links |
boolean | false |
enable_syntax_highlighting |
boolean | true |
open_links_in_new_tab |
boolean | false |
SQL Beautify
Section titled “SQL Beautify”Indents and prettifies Structured Query Language (SQL) code.
- Tool name:
cyberchef_sql_beautify - Input / output:
string→string
| Argument | Type | Default |
|---|---|---|
indent_string |
binaryShortString | \t |
SQL Minify
Section titled “SQL Minify”Compresses Structured Query Language (SQL) code.
- Tool name:
cyberchef_sql_minify - Input / output:
string→string - Arguments: none
Syntax highlighter
Section titled “Syntax highlighter”Adds syntax highlighting to a range of source code languages. Note that this will not indent the code. Use one of the ‘Beautify’ operations for that.
- Tool name:
cyberchef_syntax_highlighter - Input / output:
string→html
| Argument | Type | Default |
|---|---|---|
language |
option | auto detect |
To Camel case
Section titled “To Camel case”Converts the input string to camel case. Camel case is all lower case except letters after word boundaries which are uppercase. e.g. thisIsCamelCase ‘Attempt to be context aware’ will make the operation attempt to nicely transform variable and function names.
- Tool name:
cyberchef_to_camel_case - Input / output:
string→string
| Argument | Type | Default |
|---|---|---|
attempt_to_be_context_aware |
boolean | false |
To Kebab case
Section titled “To Kebab case”Converts the input string to kebab case. Kebab case is all lower case with dashes as word boundaries. e.g. this-is-kebab-case ‘Attempt to be context aware’ will make the operation attempt to nicely transform variable and function names.
- Tool name:
cyberchef_to_kebab_case - Input / output:
string→string
| Argument | Type | Default |
|---|---|---|
attempt_to_be_context_aware |
boolean | false |
To MessagePack
Section titled “To MessagePack”Converts JSON to MessagePack encoded byte buffer. MessagePack is a computer data interchange format. It is a binary form for representing simple data structures like arrays and associative arrays.
- Tool name:
cyberchef_to_messagepack - Input / output:
JSON→ArrayBuffer - Arguments: none
To Snake case
Section titled “To Snake case”Converts the input string to snake case. Snake case is all lower case with underscores as word boundaries. e.g. this_is_snake_case ‘Attempt to be context aware’ will make the operation attempt to nicely transform variable and function names.
- Tool name:
cyberchef_to_snake_case - Input / output:
string→string
| Argument | Type | Default |
|---|---|---|
attempt_to_be_context_aware |
boolean | false |
XML Beautify
Section titled “XML Beautify”Indents and prettifies eXtensible Markup Language (XML) code.
- Tool name:
cyberchef_xml_beautify - Input / output:
string→string
| Argument | Type | Default |
|---|---|---|
indent_string |
binaryShortString | \t |
XML Minify
Section titled “XML Minify”Compresses eXtensible Markup Language (XML) code.
- Tool name:
cyberchef_xml_minify - Input / output:
string→string
| Argument | Type | Default |
|---|---|---|
preserve_comments |
boolean | false |
XPath expression
Section titled “XPath expression”Extract information from an XML document with an XPath query
- Tool name:
cyberchef_xpath_expression - Input / output:
string→string
| Argument | Type | Default |
|---|---|---|
xpath |
string | — |
result_delimiter |
binaryShortString | \n |