This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Base64 (.b64)

Base64 binary to text encoding.
Encodes binary data as a sequence of printable ASCII characters.
Commonly used for the transfer of binary content by email.
The Base64 encoding is described in internet standard recommendations RFC 1421 and 2045.
ASCII format.
Uses the 52 uppercase and lowercase letters of the Roman alphabet, the numerals 0 to 9, and the characters and to form a positional numeral system using a base of 64.
The character is used for padding Base64-encoded data.
  • Import imports a Base64-encoded .ext file.
  • Export exports an expression to a Base64-encoded .ext file.
  • Import decodes a Base64-encoded file and imports its contents as an expression, automatically inferring the format from the file contents.
  • The import format can be given explicitly with Import.
  • Import imports the specified element from a Base64-encoded .ext file.
  • Import imports multiple elements.
  • The import format and file encoding can be explicitly specified with Import["file", {"Base64", "format", elems1, elems2, ...}].
  • Export creates a Base64-encoded .ext file by treating expr as specifying element elem.
  • Export treats each as specifying the corresponding .
  • Export exports expr with the specified option elements taken to have the specified values.
  • Export uses rules to specify the elements to be exported.
  • The export format and file encoding can be explicitly specified with Export["file", exprs, {"Base64", "format", elems}].
  • See the reference pages for full general information on Import and Export.
Convert a string to Base64 encoding:
The format must be specified when reading Base64-encoded data:
Arbitrary expressions can be encoded as Base64:
Convert a string to Base64 encoding:
In[1]:=
Click for copyable input
Out[1]=
The format must be specified when reading Base64-encoded data:
In[2]:=
Click for copyable input
Out[2]=
 
Arbitrary expressions can be encoded as Base64:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=