> For the complete documentation index, see [llms.txt](https://docs.apica.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apica.io/platform-docs/test-data-orchestrator-tdo/user-documentation/format-function-guide/hexadecimal-formats.md).

# Hexadecimal Formats

This can be used in two ways – one is to assign a fixed length random hexadecimal value to a field, and the other is to transform an assigned field to a hexadecimal value.

The usage is fairly simple.

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">EXAMPLE</td><td valign="top">RESULT</td></tr><tr><td valign="top">%HEX|4</td><td valign="top"><p>a random hexadecimal string with the given size:</p><p>"414d"</p></td></tr><tr><td valign="top">%HEX</td><td valign="top"><p>a hexadecimal string from the current value of the attribute:</p><p>eg. with "some" as current value:</p><p>"736f6d65"</p></td></tr></tbody></table>

#### Assign a random hexadecimal value

#### Convert an assigned value to hexadecimal
