Encoding & Number Bases
Hex Content Decoder
Decode pipe-delimited hex groups mixed with ASCII text, as used in Snort content strings. Review decimal byte values.
This tool runs open-source code from CyberChef by GCHQ (Apache License 2.0). See open-source credits.
Hex Content Decoder reads hexadecimal groups between pipe characters within ordinary ASCII text. This mixed representation appears in Snort content strings. For example, foo|3d|bar represents foo=bar. The current result displays decimal byte values.
The result is an array of decimal byte values. The example foo|3d|bar produces [102,111,111,61,98,97,114]. These bytes represent the ASCII text foo=bar.
- Inspect a small mixed ASCII and hexadecimal content example.
- Compare literal text with its pipe-delimited byte representation.
- Prepare a content-string fragment for review in a separate rule-writing workflow.
Instructions
- Paste only the content string, such as foo|3d|bar. Do not paste a complete Snort rule.
- Use two hexadecimal digits per byte inside each pipe-delimited group. Spaces can separate the byte pairs.
- Review the decimal byte array. Use Hex Decoder in the related tools for plain hexadecimal input without pipes.
Example
Input: a|3d|1|3b20|b|3d|2
Settings: No settings
Result: [97, 61, 49, 59, 32, 98, 61, 50], the ASCII bytes of a=1; b=2
One pair of bars can hold several bytes. Here |3b20| decodes to a semicolon and a space.
Limits
- This tool handles content-string fragments. It does not parse or validate complete Snort rules.
- Plain hex without pipe delimiters remains literal text in Hex Content Decoder. Use the separate Hex Decoder for that format.
- The decoder uses permissive matching. Unmatched text can pass through unchanged; a completed result does not certify valid rule syntax.
- A byte sequence does not identify its character encoding. Decimal byte output is not a Unicode code-point list.