Data Converter
Convert between various data formats - Base64, Binary, JSON, XML, YAML, CSV, HTML, and more
Actions49
- Base64 Actions
- Binary Actions
- Encoding Actions
- Format Actions
- HTML Actions
- String Actions
Overview
The node performs various data encoding and decoding operations, including hexadecimal encoding and decoding. Specifically, the Hex Encode operation converts input text data into its hexadecimal representation. This is useful in scenarios where you need to represent binary or textual data as a hex string for storage, transmission, or debugging purposes.
Practical examples include:
- Encoding sensitive data into hex format before sending it over protocols that require text-safe formats.
- Converting strings to hex to embed them in URLs or configuration files.
- Debugging or logging raw data in a readable hex format.
Properties
| Name | Meaning |
|---|---|
| Input Data | The text data to convert to hexadecimal format. |
| Binary Property Name | (Optional) Name for the output binary property if the output is binary data (not used here). |
Output
The output JSON contains a field named result which holds the hexadecimal encoded string of the input data.
Example output JSON structure:
{
"result": "48656c6c6f20776f726c64"
}
This example corresponds to the input "Hello world" encoded as hex.
If the node were configured to output binary data (not typical for hex encode), it would provide the encoded data in a binary property with the specified name.
Dependencies
- No external services or API keys are required.
- The node uses internal utility functions for encoding operations.
- No special environment variables or n8n configurations are necessary.
Troubleshooting
- Empty Input Data: If the input data is empty, the output will be an empty string. Ensure the input is correctly provided.
- Invalid Input Type: The input must be a string. Providing other types may cause errors.
- Error Messages: Errors during encoding typically relate to invalid input parameters. Check that the "Input Data" property is set and valid.
- Continue on Fail: If enabled, the node will continue processing subsequent items even if one fails, returning error messages in the output JSON.
Links and References
- Hexadecimal Wikipedia
- n8n Documentation - Data Converter Node
- JavaScript Buffer Documentation (for understanding hex encoding)