Skip to main content

Hex Convert

Converts between hexadecimal strings and text (UTF-8). Returns both directions in a single response.

Request

GET /nxt?requestType=hexConvert&string=<value>

Parameters

NameTypeRequiredDescription
stringstringYesInput string. Can be a hex-encoded string or plain text.

Response

{
"text": "Hello World",
"binary": "48656c6c6f20576f726c64"
}

Response Fields

FieldTypeDescription
textstringDecoded text from hex input (if input is valid hex).
binarystringHex-encoded representation of input text.

Notes

  • If the input cannot be parsed as hex, text is omitted.
  • This endpoint does not require the blockchain to be running (requireBlockchain = false).
  • Not chain-specific.
  • Does not require admin password authentication (requirePassword = false).

Source: HexConvert.java.

Example

curl "http://localhost:22024/nxt?requestType=hexConvert&string=48656c6c6f"