--- title: "text to hexdata()" slug: "string-text-to-hex-data" updated: 2025-09-17T19:48:31Z published: 2025-09-22T09:16:19Z canonical: "docs.lobstersoftware.com/string-text-to-hex-data" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # text to hexdata() This function converts text **a** into binary data using a charset **b** and outputs the data as hexadecimal text. ## Parameters | Parameter | Description | | --- | --- | | a | Text to be converted. | | b | (optional) Charset. Default: *8859_1.* | ## Example | Parameter a | Parameter b | Result | | --- | --- | --- | | ABCD | | 41424344 | | ABCDä€ | | 41424344e43f | | ABCDä€ | 8859_15 | 41424344e4a4 | | ABCDä€ | UTF8 | 41424344c3a4e282ac |