The Base16, Base32, and Base64 Data Encodings

This work is sponsored by Simon Josefsson Datakonsult AB. If you need commercial help with utilizing this technology, or have a related project that you want help with, please feel free to contact me. If you find my work in this area useful, also please consider making a donation. No amount is too small!

I have put together a free base64 implementation in portable C available in gnulib from Savannah:

I have also created a free base64 command line tool, based on the previous library. Update! My tool has now been adopted by the GNU project, and integrated into GNU CoreUtils as 'base64'. It will be maintained there.

Emacs Lisp libraries for base16, base32 and base64 also exist:

Note that modern Emacs implementations include a native base64 function. However, it uses the same interface.

The following HTML form uses PHP to enable you to interactively base64 encode and decode any (reasonably short) string.

Input:
">
Encode
Decode

An interesting related work is the human-oriented base-32 encoding.

Revision history

2009-05-28
draft-josefsson-rfc4648-impl-report-00 is published, with the goal of advancing the document to Draft Standard.
2006-10-14
rfc4648 is published.
2006-05-12
draft-josefsson-rfc3548bis-04 is published, to address IESG comments.
2006-05-03
draft-josefsson-rfc3548bis-03 is published, to address LC comments.
2006-04-03
One-month IETF-wide last call (LC) initiated.
2006-03-27
draft-josefsson-rfc3548bis-02 is published.
2006-03-23
draft-josefsson-rfc3548bis-01 is published.
2005-11-14
draft-josefsson-rfc3548bis-00 is published.
2005-11-12
Submitted rfc3548bis document.
2005-10-22
Update rfc3548bis document to include a sort-order preserving base32 alphabet, as discussed in DNSEXT WG.
2003-07-08
RFC 3548 published.
2002-02
draft-josefsson-base-encoding-04 published.
2001-11-13
draft-josefsson-base-encoding-03 published.
2001-05-04
draft-josefsson-base-encoding-02 published.
2000-08-22
draft-josefsson-base-encoding-00 published.


The copying conditions for RFCs apply, of course. However, beyond that, the part of the document that I've written (the "work") is also available under the following license.

	Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005 Simon Josefsson
	Regarding the abstract and section 1, 3, 8, 10, 12, 13, and 14
	of this document, that were written by Simon Josefsson ("the
	author", for the remainder of this section), the author makes
	no guarantees and is not responsible for any damage resulting
	from its use.  The author grants irrevocable permission to
	anyone to use, modify, and distribute it in any way that does
	not diminish the rights of anyone else to use, modify, and
	distribute it, provided that redistributed derivative works do
	not contain misleading author or version information.
	Derivative works need not be licensed under similar terms.
      


Simon Josefsson