#base64-url #base32 #hex #base64

no-std data-encoding

Efficient and customizable data-encoding functions like base64, base32, and hex

22 stable releases

2.10.0 Jan 10, 2026
2.9.0 Apr 12, 2025
2.8.0 Feb 9, 2025
2.6.0 Apr 28, 2024
1.1.1 Dec 12, 2015

#13 in Encoding

Download history 2213837/week @ 2025-11-05 2171033/week @ 2025-11-12 2373333/week @ 2025-11-19 1888977/week @ 2025-11-26 2433255/week @ 2025-12-03 3124543/week @ 2025-12-10 2893922/week @ 2025-12-17 1660647/week @ 2025-12-24 2145546/week @ 2025-12-31 3698410/week @ 2026-01-07 3855014/week @ 2026-01-14 4570651/week @ 2026-01-21 4512239/week @ 2026-01-28 4847273/week @ 2026-02-04 4724216/week @ 2026-02-11 4416337/week @ 2026-02-18

19,365,120 downloads per month
Used in 9,064 crates (624 directly)

MIT license

135KB
1.5K SLoC

CI Status Coverage Status

This library provides the following common encodings:

Name Description
HEXLOWER lowercase hexadecimal
HEXLOWER_PERMISSIVE lowercase hexadecimal (case-insensitive decoding)
HEXUPPER uppercase hexadecimal
HEXUPPER_PERMISSIVE uppercase hexadecimal (case-insensitive decoding)
BASE32 RFC4648 base32
BASE32_NOPAD RFC4648 base32 (no padding)
BASE32_NOPAD_NOCASE RFC4648 base32 (no padding, case-insensitive decoding)
BASE32_NOPAD_VISUAL RFC4648 base32 (no padding, visual-approx. decoding)
BASE32HEX RFC4648 base32hex
BASE32HEX_NOPAD RFC4648 base32hex (no padding)
BASE32_DNSSEC RFC5155 base32
BASE32_DNSCURVE DNSCurve base32
BASE64 RFC4648 base64
BASE64_NOPAD RFC4648 base64 (no padding)
BASE64_MIME RFC2045-like base64
BASE64_MIME_PERMISSIVE RFC2045-like base64 (ignoring trailing bits)
BASE64URL RFC4648 base64url
BASE64URL_NOPAD RFC4648 base64url (no padding)

It also provides the possibility to define custom little-endian ASCII base-conversion encodings for bases of size 2, 4, 8, 16, 32, and 64 (for which all above use-cases are particular instances).

See the documentation for more details.

No runtime deps

Features