mirage/ocaml-base64

Base64 encoding and decoding in OCaml

48

stars

187

commits

OCaml

primary language

Sep 23, 2025

updated

Browse cluster: OCaml Systems Programming & MirageOS

README

Base64 for OCaml

Base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. It is specified in RFC 4648.

See also documentation.

Example

Simple encoding and decoding.

utop # #require "base64";;
utop # let enc = Base64.encode_exn "OCaml rocks!";;
val enc : string = "T0NhbWwgcm9ja3Mh"
utop # let plain = Base64.decode_exn enc;;
val plain : string = "OCaml rocks!"

License

ISC

Contributors

dinosaure

89 commits

avsm

41 commits

samoht

19 commits

whitequark

7 commits

mirage/ocaml-base64

Base64 encoding and decoding in OCaml

48

stars

187

commits

OCaml

primary language

Sep 23, 2025

updated

Browse cluster: OCaml Systems Programming & MirageOS

README

Base64 for OCaml

Base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. It is specified in RFC 4648.

See also documentation.

Example

Simple encoding and decoding.

utop # #require "base64";;
utop # let enc = Base64.encode_exn "OCaml rocks!";;
val enc : string = "T0NhbWwgcm9ja3Mh"
utop # let plain = Base64.decode_exn enc;;
val plain : string = "OCaml rocks!"

License

ISC

Contributors

dinosaure

89 commits

avsm

41 commits

samoht

19 commits

whitequark

7 commits

Languages

OCaml

98.6%

Shell

1.3%