|-
| width='120' | '''Signatures'''
|{{Func|convert:stringbytes-to-hex|$input as xs:byte*|xs:hexBinary}}
|-
| '''Summary'''
|Converts the specified byte sequence to a {{Code|xs:hexBinary}} item. Conversion is cheap, as {{Code|xs:hexBinary}} items are internally represented as byte arrays.
|-
| '''Errors'''
|{{Error|BXCO0001|#Errors}} The input cannot be represented in the specified encoding.<br/>{{Error|BXCO0002|#Errors}} The specified encoding is invalid or not supported.
|-
| '''Examples'''
|
* {{Code|convert:string-to-hex('HelloWorld')}} returns the Base64 item {{Code|48656C6C6F576F726C64}}.
|}