Hex Decode
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:
| Field | Required | Default | Description |
|---|---|---|---|
field | Y | - | Source field containing hexadecimal data to decode |
target_field | N | Same as field | Target field to store decoded result |
format | N | ascii | Output format: ascii, utf8, color, dump, intel_hex |
description | N | - | Explanatory note |
if | N | - | Condition to run |
ignore_failure | N | false | Continue processing if decoding fails |
ignore_missing | N | false | Skip processing if referenced field doesn't exist |
on_failure | N | - | See Handling Failures |
on_success | N | - | See Handling Success |
tag | N | - | 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... | |
decodes to readable text: | |
Color Code Decoding
Parsing hex color into RGB components... | |
extracts color information: | |
Hex Dump Format
Parsing hexdump with file type detection... | |
extracts data with file type: | |
Intel HEX Format
Decoding Intel HEX firmware record... | |
parses structured record: | |