← TechnologyThe essentials of

Binascii: viewing bytes in hexadecimal

Publisher: ResumeMaker • 1 source

Published: 22 Oct 2026 16:11 · Updated: 22 Oct 2026 16:11

AI source check: 22 Oct 2026 14:04. This is not editorial approval.

In a few sentences

In brief

binascii.hexlify(b'AB') gives b'4142', while unhexlify() performs the reverse conversion. This represents bytes; it neither compresses nor encrypts them.

Useful to know

binascii.hexlify(b'AB') gives b'4142', while unhexlify() performs the reverse conversion. This represents bytes; it neither compresses nor encrypts them. [1]

It helps inspect binary data when ordinary text output hides the contents. Check input format and length. An arbitrary readable string does not become valid hexadecimal merely because it is meant to contain an identifier.

Sources

For further detail and to check the information:

  1. [1] binascii — Convert between binary and ASCII — Python 3.12.15 documentation ↗