Convert & calculate

Text & bytes converter

Convert text to hex bytes and back, including fixed-size bytes32 values.

Runs in your browser

What have you got?

Text one way, hex bytes the other. Both convert as you type.

Anything readable — a name, a label, a sentence. Spaces and emoji are fine.

Your text as bytes

Type on the left and the hex bytes, the byte count and the bytes32 form all appear here.

Bytes, hex and bytes32

The three words this tool keeps using, in plain English.

A byte

A number from 0 to 255. Text becomes bytes through UTF-8: “A” is 65, written as 41 in hex.

Hex

Each byte written as exactly two characters, 00 to ff, usually with 0x in front. It is compact and unambiguous, which is why chains use it everywhere.

bytes32

A fixed 32-byte slot in Solidity. Storing text in one is cheap but caps you at 31 bytes, since the value is zero-padded and needs a zero to end on.