RFC 4648-compliant Base16 encodings/decodings

Version on this page:
Stackage Nightly 2020-03-30:
Latest on Hackage:

See all snapshots base16 appears in

BSD-3-Clause licensed by Emily Pillmore
Maintained by

Module documentation for

This version can be pinned in stack with:base16-,2139


Build Status Hackage

Padded and unpadded base16 and base16hex encoding and decoding for Text and ByteString values.

For the companion optics and pattern synonyms, see base16-lens.


What does this library provide? Here is the summary:

  • Great encoding performance compared to existing libraries (e.g. memory, base16-bytestring)
  • Better decoding performance compared to existing libraries.
  • Support for Text encodings and decodings
  • Optics for handling more complex structures with Base16 representations via the base16-lens package
  • Checks for both valid Base16 and correct Base16 and Base16hex encodings

There are no dependencies aside from those bundled with GHC.


Revision history for base16 – 2020-02-17

  • Documentation now references correct RFC section

0.1.2 – 2020-02-17

  • Unmask loops - now correct.

0.1.1 – 2020-02-17

  • Mask Word32 and Word64 loops (flaky) – 2020-02-16

  • First version. Released on an unsuspecting world.
Depends on 3 packages(full list with versions):
Used by 1 package in nightly-2020-03-25(full list with versions):