String to Hex Converter

Text has to become bytes before it can go into a transaction, and those bytes are written in hex. This converter turns a plain string into its hex byte representation for use in calldata and payloads. It runs entirely in your browser.

Type UTF-8 text to see its hex and Base64 encodings. To decode hex back to text, paste it below.

完全在浏览器中运行。无需 API 密钥,数据不离开本页面。

Text as hex bytes

Each character is encoded to its UTF-8 bytes and then written in hexadecimal. The result is the form strings take inside calldata, event data and off-chain payloads. For example, the ticker DAI becomes its three-byte hex sequence, ready to be packed into a request.

Preparing on-chain string data

When you assemble raw calldata or a signed message without an ABI helper, you need each text field as hex bytes. Converting here gives you a byte sequence that lines up with what a contract or verifier will read.

常见问题

Will the output be prefixed with 0x?

The tool shows the raw hex byte sequence; add a 0x prefix yourself when a field or ABI encoder requires it.

Does this send my text anywhere?

No. Conversion is entirely local to your browser with no network call and no API key.

相关工具

充值、拿密钥、上线。

自助开通。支持加密货币或银行卡。按额度计费——重型原语更贵,简单调用很便宜。

获取 API 密钥