Usage:
  • String to hex: Paste content on left, click 'Hex Encode';
  • Hex to string: Paste encoded content on right, click 'Hex Decode';

Online Hex Encoder/Decoder

Provides hex encoded content, automatically parsed in real time into original data, supporting conversion between ASCII strings and hex strings. It can convert invisible binary byte content into a readable encoded form, and can be used for storage, transmission, etc.

What is Hexadecimal

Hexadecimal is a numeral system that uses 0-9 and A-F, a total of 16 characters to represent values. Features include:

  • Each digit's weight is a power of 16.
  • It conveniently represents binary data, as four binary digits correspond to one hex digit.
  • For example, decimal 10 is A in hex, decimal 15 is F, and decimal 16 is 10.

Hexadecimal Encoding Algorithm

  • Starting from the least significant bit, group every 4 binary digits.
  • Convert each group to its corresponding hex digit.
  • For example, binary number 11010110 can be split into two groups: 1101 and 0110. 1101 corresponds to hex D, and 0110 corresponds to hex 6, so the binary number's hex representation is D6.

Go Implementation

hex.EncodeToString([]byte("11010110"))

Try it out

68747470733a2f2f7777772e637965616d2e636f6d2f

Feedback