Skip to main content
Version: 1.5.1

Hex Decode

Parse Data Analysis

Synopsis

Decodes hexadecimal strings into ASCII text, color codes, hex dumps, or Intel HEX firmware format.

Schema

- hex_decode:
field: <ident>
target_field: <string>
format: <string>
description: <text>
if: <script>
ignore_failure: <boolean>
ignore_missing: <boolean>
on_failure: <processor[]>
on_success: <processor[]>
tag: <string>

Configuration

The following fields are used to define the processor:

FieldRequiredDefaultDescription
fieldY-Source field containing hexadecimal data to decode
target_fieldNSame as fieldTarget field to store decoded result
formatNasciiOutput format: ascii, utf8, color, dump, intel_hex
descriptionN-Explanatory note
ifN-Condition to run
ignore_failureNfalseContinue processing if decoding fails
ignore_missingNfalseSkip processing if referenced field doesn't exist
on_failureN-See Handling Failures
on_successN-See Handling Success
tagN-Identifier

Details

Decodes hexadecimal strings into various output formats depending on the format parameter.

The processor supports four specialized decode formats:

ascii/utf8: Converts hex-encoded strings to text representation. Automatically strips spaces, newlines, tabs, and "0x"/"0X" prefixes from input.

color: Parses hex color codes (3 or 6 digits, with or without "#" prefix) into RGB components with color names for common colors. Returns structured data with name, hex, R, G, B fields.

dump: Parses hexdump format (address, hex bytes, ASCII representation) and extracts binary data with file type detection for PNG, JPEG, ZIP, ELF based on magic bytes.

intel_hex: Decodes Intel HEX firmware format into structured records with length, address, record type, data, checksum, and validation status.

Default target field behavior: if not specified, overwrites the source field with decoded result.

Examples

Basic ASCII Decoding

Converting hexadecimal to text...

{
"hex_field": "48656c6c6f20576f726c6421"
}
- hex_decode:
field: hex_field
target_field: decoded_field
format: ascii

decodes to readable text:

{
"hex_field": "48656c6c6f20576f726c6421",
"decoded_field": "Hello World!"
}

Color Code Decoding

Parsing hex color into RGB components...

{
"color_field": "#FF0000"
}
- hex_decode:
field: color_field
target_field: color_info
format: color

extracts color information:

{
"color_field": "#FF0000",
"color_info": {
"name": "Red",
"hex": "FF0000",
"r": 255,
"g": 0,
"b": 0
}
}

Hex Dump Format

Parsing hexdump with file type detection...

{
"dump_field": "00000000: 89504e47 0d0a1a0a 00000000 494844522 .PNG........IHDR"
}
- hex_decode:
field: dump_field
target_field: dump_info
format: dump

extracts data with file type:

{
"dump_field": "00000000: 89504e47...",
"dump_info": {
"data": [137, 80, 78, 71, ...],
"size": 16,
"addresses": ["00000000"],
"file_type": "PNG"
}
}

Intel HEX Format

Decoding Intel HEX firmware record...

{
"intel_hex_field": ":10010000214601360121470136007EFE09D2190140"
}
- hex_decode:
field: intel_hex_field
target_field: intel_record
format: intel_hex

parses structured record:

{
"intel_hex_field": ":10010000214601360121470136007EFE09D2190140",
"intel_record": {
"length": 16,
"address": 256,
"record_type": 0,
"type_name": "Data",
"data": [33, 70, 1, 54, ...],
"data_hex": "214601360121470136007EFE09D21901",
"checksum": 64,
"valid": true
}
}