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.


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

Revision history

draft-josefsson-rfc4648-impl-report-00 is published, with the goal of advancing the document to Draft Standard.
rfc4648 is published.
draft-josefsson-rfc3548bis-04 is published, to address IESG comments.
draft-josefsson-rfc3548bis-03 is published, to address LC comments.
One-month IETF-wide last call (LC) initiated.
draft-josefsson-rfc3548bis-02 is published.
draft-josefsson-rfc3548bis-01 is published.
draft-josefsson-rfc3548bis-00 is published.
Submitted rfc3548bis document.
Update rfc3548bis document to include a sort-order preserving base32 alphabet, as discussed in DNSEXT WG.
RFC 3548 published.
draft-josefsson-base-encoding-04 published.
draft-josefsson-base-encoding-03 published.
draft-josefsson-base-encoding-02 published.
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