<s>
In	O
computer	B-General_Concept
programming	I-General_Concept
,	O
Base64	B-Protocol
is	O
a	O
group	O
of	O
binary-to-text	O
encoding	O
schemes	O
that	O
represent	O
binary	O
data	O
(	O
more	O
specifically	O
,	O
a	O
sequence	O
of	O
8-bit	O
bytes	B-Application
)	O
in	O
sequences	O
of	O
24	O
bits	O
that	O
can	O
be	O
represented	O
by	O
four	O
6-bit	O
Base64	B-Protocol
digits	O
.	O
</s>
<s>
Common	O
to	O
all	O
binary-to-text	O
encoding	O
schemes	O
,	O
Base64	B-Protocol
is	O
designed	O
to	O
carry	O
data	O
stored	O
in	O
binary	O
formats	O
across	O
channels	O
that	O
only	O
reliably	O
support	O
text	O
content	O
.	O
</s>
<s>
Base64	B-Protocol
is	O
particularly	O
prevalent	O
on	O
the	O
World	O
Wide	O
Web	O
where	O
one	O
of	O
its	O
uses	O
is	O
the	O
ability	O
to	O
embed	O
image	O
files	O
or	O
other	O
binary	O
assets	O
inside	O
textual	O
assets	O
such	O
as	O
HTML	B-Language
and	O
CSS	B-Language
files	O
.	O
</s>
<s>
Base64	B-Protocol
is	O
also	O
widely	O
used	O
for	O
sending	O
e-mail	O
attachments	O
.	O
</s>
<s>
This	O
is	O
required	O
because	O
SMTP	B-Protocol
–	O
in	O
its	O
original	O
form	O
–	O
was	O
designed	O
to	O
transport	O
7-bit	B-Protocol
ASCII	I-Protocol
characters	O
only	O
.	O
</s>
<s>
Each	O
Base64	B-Protocol
digit	O
can	O
take	O
on	O
64	O
different	O
values	O
,	O
encoding	O
6	O
bits	O
of	O
data	O
.	O
</s>
<s>
For	O
example	O
,	O
MIME	B-Protocol
's	O
Base64	B-Protocol
implementation	O
uses	O
A	O
–	O
Z	O
,	O
a	O
–	O
z	O
,	O
and	O
0	O
–	O
9	O
for	O
the	O
first	O
62	O
values	O
.	O
</s>
<s>
The	O
earliest	O
instances	O
of	O
this	O
type	O
of	O
encoding	O
were	O
created	O
for	O
dial-up	O
communication	O
between	O
systems	O
running	O
the	O
same	O
OS	B-General_Concept
,	O
for	O
example	O
,	O
uuencode	B-Device
for	O
UNIX	B-Application
and	O
BinHex	O
for	O
the	O
TRS-80	B-Device
(	O
later	O
adapted	O
for	O
the	O
Macintosh	B-Device
)	O
,	O
and	O
could	O
therefore	O
make	O
more	O
assumptions	O
about	O
what	O
characters	O
were	O
safe	O
to	O
use	O
.	O
</s>
<s>
For	O
instance	O
,	O
uuencode	B-Device
uses	O
uppercase	O
letters	O
,	O
digits	O
,	O
and	O
many	O
punctuation	O
characters	O
,	O
but	O
no	O
lowercase	O
.	O
</s>
<s>
This	O
is	O
the	O
Base64	B-Protocol
alphabet	O
defined	O
in	O
RFC	O
4648	O
§4	O
.	O
</s>
<s>
The	O
example	O
below	O
uses	O
ASCII	B-Protocol
text	I-Protocol
for	O
simplicity	O
,	O
but	O
this	O
is	O
not	O
a	O
typical	O
use	O
case	O
,	O
as	O
it	O
can	O
already	O
be	O
safely	O
transferred	O
across	O
all	O
systems	O
that	O
can	O
handle	O
Base64	B-Protocol
.	O
</s>
<s>
The	O
more	O
typical	O
use	O
is	O
to	O
encode	O
binary	O
data	O
(	O
such	O
as	O
an	O
image	O
)	O
;	O
the	O
resulting	O
Base64	B-Protocol
data	O
will	O
only	O
contain	O
64	O
different	O
ASCII	B-Protocol
characters	I-Protocol
,	O
all	O
of	O
which	O
can	O
reliably	O
be	O
transferred	O
across	O
systems	O
that	O
may	O
corrupt	O
the	O
raw	O
source	O
bytes	B-Application
.	O
</s>
<s>
Here	O
is	O
a	O
well-known	O
idiom	O
from	O
distributed	B-Architecture
computing	I-Architecture
:	O
</s>
<s>
When	O
the	O
quote	O
(	O
without	O
trailing	O
whitespace	O
)	O
is	O
encoded	O
into	O
Base64	B-Protocol
,	O
it	O
is	O
represented	O
as	O
a	O
byte	B-Application
sequence	O
of	O
8-bit-padded	O
ASCII	B-Protocol
characters	I-Protocol
encoded	O
in	O
MIME	B-Protocol
's	O
Base64	B-Protocol
scheme	O
as	O
follows	O
(	O
newlines	O
and	O
white	O
spaces	O
may	O
be	O
present	O
anywhere	O
but	O
are	O
to	O
be	O
ignored	O
on	O
decoding	O
)	O
:	O
</s>
<s>
Encoded	O
in	O
ASCII	B-Protocol
,	O
the	O
characters	O
M	O
,	O
a	O
,	O
and	O
n	O
are	O
stored	O
as	O
the	O
byte	B-Application
values	O
77	O
,	O
97	O
,	O
and	O
110	O
,	O
which	O
are	O
the	O
8-bit	O
binary	O
values	O
01001101	O
,	O
01100001	O
,	O
and	O
01101110	O
.	O
</s>
<s>
Groups	O
of	O
6	O
bits	O
(	O
6	O
bits	O
have	O
a	O
maximum	O
of	O
26	O
=	O
64	O
different	O
binary	O
values	O
)	O
are	O
converted	O
into	O
individual	O
numbers	O
from	O
start	O
to	O
end	O
(	O
in	O
this	O
case	O
,	O
there	O
are	O
four	O
numbers	O
in	O
a	O
24-bit	O
string	O
)	O
,	O
which	O
are	O
then	O
converted	O
into	O
their	O
corresponding	O
Base64	B-Protocol
character	O
values	O
.	O
</s>
<s>
As	O
this	O
example	O
illustrates	O
,	O
Base64	B-Protocol
encoding	I-Protocol
converts	O
three	O
octets	O
into	O
four	O
encoded	O
characters	O
.	O
</s>
<s>
=	O
padding	O
characters	O
might	O
be	O
added	O
to	O
make	O
the	O
last	O
encoded	O
block	O
contain	O
four	O
Base64	B-Protocol
characters	O
.	O
</s>
<s>
Hexadecimal	O
to	O
octal	O
transformation	O
is	O
useful	O
to	O
convert	O
between	O
binary	O
and	O
Base64	B-Protocol
.	O
</s>
<s>
Using	O
those	O
four	O
decimal	O
numbers	O
as	O
indices	O
for	O
the	O
Base64	B-Protocol
alphabet	O
,	O
the	O
corresponding	O
ASCII	B-Protocol
characters	I-Protocol
are	O
TWFu	O
.	O
</s>
<s>
If	O
there	O
are	O
only	O
two	O
significant	O
input	O
octets	O
(	O
e.g.	O
,	O
'	O
Ma	O
 '	O
)	O
,	O
or	O
when	O
the	O
last	O
input	O
group	O
contains	O
only	O
two	O
octets	O
,	O
all	O
16	O
bits	O
will	O
be	O
captured	O
in	O
the	O
first	O
three	O
Base64	B-Protocol
digits	O
(	O
18	O
bits	O
)	O
;	O
the	O
two	O
least	O
significant	O
bits	O
of	O
the	O
last	O
content-bearing	O
6-bit	O
block	O
will	O
turn	O
out	O
to	O
be	O
zero	O
,	O
and	O
discarded	O
on	O
decoding	O
(	O
along	O
with	O
the	O
succeeding	O
=	O
padding	O
character	O
)	O
:	O
</s>
<s>
If	O
there	O
is	O
only	O
one	O
significant	O
input	O
octet	O
(	O
e.g.	O
,	O
'	O
M	O
 '	O
)	O
,	O
or	O
when	O
the	O
last	O
input	O
group	O
contains	O
only	O
one	O
octet	O
,	O
all	O
8	O
bits	O
will	O
be	O
captured	O
in	O
the	O
first	O
two	O
Base64	B-Protocol
digits	O
(	O
12	O
bits	O
)	O
;	O
the	O
four	O
least	O
significant	O
bits	O
of	O
the	O
last	O
content-bearing	O
6-bit	O
block	O
will	O
turn	O
out	O
to	O
be	O
zero	O
,	O
and	O
discarded	O
on	O
decoding	O
(	O
along	O
with	O
the	O
succeeding	O
two	O
=	O
padding	O
characters	O
)	O
:	O
</s>
<s>
Because	O
Base64	B-Protocol
is	O
a	O
six-bit	O
encoding	O
,	O
and	O
because	O
the	O
decoded	O
values	O
are	O
divided	O
into	O
8-bit	O
octets	O
,	O
every	O
four	O
characters	O
of	O
Base64-encoded	O
text	O
(	O
4	O
sextets	O
=	O
=	O
24	O
bits	O
)	O
represents	O
three	O
octets	O
of	O
unencoded	O
text	O
or	O
data	O
(	O
3	O
octets	O
=	O
=	O
24	O
bits	O
)	O
.	O
</s>
<s>
The	O
padding	O
character	O
is	O
not	O
essential	O
for	O
decoding	O
,	O
since	O
the	O
number	O
of	O
missing	O
bytes	B-Application
can	O
be	O
inferred	O
from	O
the	O
length	O
of	O
the	O
encoded	O
text	O
.	O
</s>
<s>
An	O
exception	O
in	O
which	O
padding	O
characters	O
are	O
required	O
is	O
when	O
multiple	O
Base64	B-Protocol
encoded	O
files	O
have	O
been	O
concatenated	O
.	O
</s>
<s>
When	O
decoding	O
Base64	B-Protocol
text	O
,	O
four	O
characters	O
are	O
typically	O
converted	O
back	O
to	O
three	O
bytes	B-Application
.	O
</s>
<s>
A	O
single	O
=	O
indicates	O
that	O
the	O
four	O
characters	O
will	O
decode	O
to	O
only	O
two	O
bytes	B-Application
,	O
while	O
==	O
indicates	O
that	O
the	O
four	O
characters	O
will	O
decode	O
to	O
only	O
a	O
single	O
byte	B-Application
.	O
</s>
<s>
In	O
this	O
instance	O
,	O
we	O
would	O
get	O
6	O
bits	O
from	O
the	O
d	O
,	O
and	O
another	O
6	O
bits	O
from	O
the	O
w	O
for	O
a	O
bit	O
string	O
of	O
length	O
12	O
,	O
but	O
since	O
we	O
remove	O
2	O
bits	O
for	O
each	O
=	O
(	O
for	O
a	O
total	O
of	O
4	O
bits	O
)	O
,	O
the	O
dw	O
==	O
ends	O
up	O
producing	O
8	O
bits	O
(	O
1	O
byte	B-Application
)	O
when	O
decoded	O
.	O
</s>
<s>
Without	O
padding	O
,	O
after	O
normal	O
decoding	O
of	O
four	O
characters	O
to	O
three	O
bytes	B-Application
over	O
and	O
over	O
again	O
,	O
fewer	O
than	O
four	O
encoded	O
characters	O
may	O
remain	O
.	O
</s>
<s>
A	O
single	O
remaining	O
encoded	O
character	O
is	O
not	O
possible	O
,	O
because	O
a	O
single	O
Base64	B-Protocol
character	O
only	O
contains	O
6	O
bits	O
,	O
and	O
8	O
bits	O
are	O
required	O
to	O
create	O
a	O
byte	B-Application
,	O
so	O
a	O
minimum	O
of	O
two	O
Base64	B-Protocol
characters	O
are	O
required	O
:	O
The	O
first	O
character	O
contributes	O
6	O
bits	O
,	O
and	O
the	O
second	O
character	O
contributes	O
its	O
first	O
2	O
bits	O
.	O
</s>
<s>
The	O
first	O
known	O
standardized	O
use	O
of	O
the	O
encoding	O
now	O
called	O
MIME	B-Protocol
Base64	B-Protocol
was	O
in	O
the	O
Privacy-enhanced	B-Protocol
Electronic	I-Protocol
Mail	I-Protocol
(	O
PEM	O
)	O
protocol	O
,	O
proposed	O
by	O
in	O
1987	O
.	O
</s>
<s>
PEM	O
defines	O
a	O
"	O
printable	O
encoding	O
"	O
scheme	O
that	O
uses	O
Base64	B-Protocol
encoding	I-Protocol
to	O
transform	O
an	O
arbitrary	O
sequence	O
of	O
octets	O
to	O
a	O
format	O
that	O
can	O
be	O
expressed	O
in	O
short	O
lines	O
of	O
6-bit	O
characters	O
,	O
as	O
required	O
by	O
transfer	O
protocols	O
such	O
as	O
SMTP	B-Protocol
.	O
</s>
<s>
To	O
convert	O
data	O
to	O
PEM	O
printable	O
encoding	O
,	O
the	O
first	O
byte	B-Application
is	O
placed	O
in	O
the	O
most	O
significant	O
eight	O
bits	O
of	O
a	O
24-bit	O
buffer	B-General_Concept
,	O
the	O
next	O
in	O
the	O
middle	O
eight	O
,	O
and	O
the	O
third	O
in	O
the	O
least	O
significant	O
eight	O
bits	O
.	O
</s>
<s>
If	O
there	O
are	O
fewer	O
than	O
three	O
bytes	B-Application
left	O
to	O
encode	O
(	O
or	O
in	O
total	O
)	O
,	O
the	O
remaining	O
buffer	B-General_Concept
bits	O
will	O
be	O
zero	O
.	O
</s>
<s>
The	O
buffer	B-General_Concept
is	O
then	O
used	O
,	O
six	O
bits	O
at	O
a	O
time	O
,	O
most	O
significant	O
first	O
,	O
as	O
indices	O
into	O
the	O
string	O
:	O
"	O
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+	O
/	O
"	O
,	O
and	O
the	O
indicated	O
character	O
is	O
output	O
.	O
</s>
<s>
After	O
encoding	O
the	O
non-padded	O
data	O
,	O
if	O
two	O
octets	O
of	O
the	O
24-bit	O
buffer	B-General_Concept
are	O
padded-zeros	O
,	O
two	O
=	O
characters	O
are	O
appended	O
to	O
the	O
output	O
;	O
if	O
one	O
octet	O
of	O
the	O
24-bit	O
buffer	B-General_Concept
is	O
filled	O
with	O
padded-zeros	O
,	O
one	O
=	O
character	O
is	O
appended	O
.	O
</s>
<s>
This	O
also	O
guarantees	O
that	O
the	O
encoded	O
output	O
length	O
is	O
a	O
multiple	O
of	O
4	O
bytes	B-Application
.	O
</s>
<s>
The	O
MIME	B-Protocol
(	O
Multipurpose	B-Protocol
Internet	I-Protocol
Mail	I-Protocol
Extensions	I-Protocol
)	O
specification	O
lists	O
Base64	B-Protocol
as	O
one	O
of	O
two	O
binary-to-text	O
encoding	O
schemes	O
(	O
the	O
other	O
being	O
quoted-printable	O
)	O
.	O
</s>
<s>
MIME	B-Protocol
's	O
Base64	B-Protocol
encoding	I-Protocol
is	O
based	O
on	O
that	O
of	O
the	O
version	O
of	O
PEM	O
:	O
it	O
uses	O
the	O
same	O
64-character	O
alphabet	O
and	O
encoding	O
mechanism	O
as	O
PEM	O
and	O
uses	O
the	O
=	O
symbol	O
for	O
output	O
padding	O
in	O
the	O
same	O
way	O
,	O
as	O
described	O
at	O
.	O
</s>
<s>
MIME	B-Protocol
does	O
not	O
specify	O
a	O
fixed	O
length	O
for	O
Base64-encoded	O
lines	O
,	O
but	O
it	O
does	O
specify	O
a	O
maximum	O
line	O
length	O
of	O
76	O
characters	O
.	O
</s>
<s>
Thus	O
,	O
the	O
actual	O
length	O
of	O
MIME-compliant	O
Base64-encoded	O
binary	O
data	O
is	O
usually	O
about	O
137%	O
of	O
the	O
original	O
data	O
length	O
( ×	O
)	O
,	O
though	O
for	O
very	O
short	O
messages	O
the	O
overhead	O
can	O
be	O
much	O
higher	O
due	O
to	O
the	O
overhead	O
of	O
the	O
headers	O
.	O
</s>
<s>
Very	O
roughly	O
,	O
the	O
final	O
size	O
of	O
Base64-encoded	O
binary	O
data	O
is	O
equal	O
to	O
1.37	O
times	O
the	O
original	O
data	O
size	O
+	O
814	O
bytes	B-Application
(	O
for	O
headers	O
)	O
.	O
</s>
<s>
UTF-7	O
,	O
described	O
first	O
in	O
,	O
which	O
was	O
later	O
superseded	O
by	O
,	O
introduced	O
a	O
system	O
called	O
modified	B-Protocol
Base64	I-Protocol
.	O
</s>
<s>
This	O
data	O
encoding	O
scheme	O
is	O
used	O
to	O
encode	O
UTF-16	O
as	O
ASCII	B-Protocol
characters	I-Protocol
for	O
use	O
in	O
7-bit	O
transports	O
such	O
as	O
SMTP	B-Protocol
.	O
</s>
<s>
It	O
is	O
a	O
variant	O
of	O
the	O
Base64	B-Protocol
encoding	I-Protocol
used	O
in	O
MIME	B-Protocol
.	O
</s>
<s>
The	O
"	O
Modified	B-Protocol
Base64	I-Protocol
"	O
alphabet	O
consists	O
of	O
the	O
MIME	B-Protocol
Base64	B-Protocol
alphabet	O
,	O
but	O
does	O
not	O
use	O
the	O
"	O
=	O
"	O
padding	O
character	O
.	O
</s>
<s>
Modified	B-Protocol
Base64	I-Protocol
simply	O
omits	O
the	O
padding	O
and	O
ends	O
immediately	O
after	O
the	O
last	O
Base64	B-Protocol
digit	O
containing	O
useful	O
bits	O
leaving	O
up	O
to	O
three	O
unused	O
bits	O
in	O
the	O
last	O
Base64	B-Protocol
digit	O
.	O
</s>
<s>
OpenPGP	O
,	O
described	O
in	O
,	O
describes	O
Radix-64	O
encoding	O
,	O
also	O
known	O
as	O
"	O
ASCII	B-Protocol
armor	O
"	O
.	O
</s>
<s>
Radix-64	O
is	O
identical	O
to	O
the	O
"	O
Base64	B-Protocol
"	O
encoding	O
described	O
by	O
MIME	B-Protocol
,	O
with	O
the	O
addition	O
of	O
an	O
optional	O
24-bit	O
CRC	O
.	O
</s>
<s>
The	O
checksum	B-Algorithm
is	O
calculated	O
on	O
the	O
input	O
data	O
before	O
encoding	O
;	O
the	O
checksum	B-Algorithm
is	O
then	O
encoded	O
with	O
the	O
same	O
Base64	B-Protocol
algorithm	O
and	O
,	O
prefixed	O
by	O
the	O
"	O
=	O
"	O
symbol	O
as	O
the	O
separator	O
,	O
appended	O
to	O
the	O
encoded	O
output	O
data	O
.	O
</s>
<s>
,	O
entitled	O
The	O
Base16	O
,	O
Base32	O
,	O
and	O
Base64	B-Protocol
Data	O
Encodings	O
,	O
is	O
an	O
informational	O
(	O
non-normative	O
)	O
memo	O
that	O
attempts	O
to	O
unify	O
the	O
and	O
specifications	O
of	O
Base64	B-Protocol
encodings	I-Protocol
,	O
alternative-alphabet	O
encodings	O
,	O
and	O
the	O
Base32	O
(	O
which	O
is	O
seldom	O
used	O
)	O
and	O
Base16	O
encodings	O
.	O
</s>
<s>
This	O
RFC	O
obsoletes	O
RFC	O
3548	O
and	O
focuses	O
on	O
Base64/32/16	O
:	O
</s>
<s>
This	O
document	O
describes	O
the	O
commonly	O
used	O
Base64	B-Protocol
,	O
Base32	O
,	O
and	O
Base16	O
encoding	O
schemes	O
.	O
</s>
<s>
Base64	B-Protocol
encoding	I-Protocol
can	O
be	O
helpful	O
when	O
fairly	O
lengthy	O
identifying	O
information	O
is	O
used	O
in	O
an	O
HTTP	O
environment	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
database	O
persistence	O
framework	O
for	O
Java	B-Language
objects	O
might	O
use	O
Base64	B-Protocol
encoding	I-Protocol
to	O
encode	O
a	O
relatively	O
large	O
unique	O
id	O
(	O
generally	O
128-bit	O
UUIDs	O
)	O
into	O
a	O
string	O
for	O
use	O
as	O
an	O
HTTP	O
parameter	O
in	O
HTTP	O
forms	O
or	O
HTTP	O
GET	O
URLs	O
.	O
</s>
<s>
Also	O
,	O
many	O
applications	O
need	O
to	O
encode	O
binary	O
data	O
in	O
a	O
way	O
that	O
is	O
convenient	O
for	O
inclusion	O
in	O
URLs	O
,	O
including	O
in	O
hidden	O
web	O
form	O
fields	O
,	O
and	O
Base64	B-Protocol
is	O
a	O
convenient	O
encoding	O
to	O
render	O
them	O
in	O
a	O
compact	O
way	O
.	O
</s>
<s>
Using	O
standard	O
Base64	B-Protocol
in	O
URL	O
requires	O
encoding	O
of	O
'	O
+	O
 '	O
,	O
'	O
/	O
'	O
and	O
'	O
=	O
'	O
characters	O
into	O
special	O
percent-encoded	O
hexadecimal	O
sequences	O
('+'	O
becomes	O
'	O
%2B	O
 '	O
,	O
'	O
/	O
'	O
becomes	O
'	O
%2F	O
 '	O
and	O
'	O
=	O
'	O
becomes	O
'	O
%3D	O
 '	O
)	O
,	O
which	O
makes	O
the	O
string	O
unnecessarily	O
longer	O
.	O
</s>
<s>
For	O
this	O
reason	O
,	O
modified	B-Protocol
Base64	I-Protocol
for	O
URL	O
variants	O
exist	O
(	O
such	O
as	O
base64url	O
in	O
)	O
,	O
where	O
the	O
'	O
+	O
 '	O
and	O
'	O
/	O
'	O
characters	O
of	O
standard	O
Base64	B-Protocol
are	O
respectively	O
replaced	O
by	O
'	O
-	O
'	O
and	O
'	O
_	O
 '	O
,	O
so	O
that	O
using	O
URL	O
encoders/decoders	O
is	O
no	O
longer	O
necessary	O
and	O
has	O
no	O
effect	O
on	O
the	O
length	O
of	O
the	O
encoded	O
value	O
,	O
leaving	O
the	O
same	O
encoded	O
form	O
intact	O
for	O
use	O
in	O
relational	O
databases	O
,	O
web	O
forms	O
,	O
and	O
object	O
identifiers	O
in	O
general	O
.	O
</s>
<s>
The	O
atob( )	O
and	O
btoa( )	O
JavaScript	O
methods	O
,	O
defined	O
in	O
the	O
HTML5	O
draft	O
specification	O
,	O
provide	O
Base64	B-Protocol
encoding	I-Protocol
and	O
decoding	O
functionality	O
to	O
web	O
pages	O
.	O
</s>
<s>
Base64	B-Protocol
can	O
be	O
used	O
in	O
a	O
variety	O
of	O
contexts	O
:	O
</s>
<s>
Base64	B-Protocol
is	O
often	O
used	O
to	O
embed	O
binary	O
data	O
in	O
an	O
XML	B-Protocol
file	O
,	O
using	O
a	O
syntax	O
similar	O
to	O
<data encoding="base64">…</data>	O
e.g.	O
</s>
<s>
favicons	O
in	O
Firefox	B-Application
's	O
exported	O
bookmarks.html	O
.	O
</s>
<s>
Base64	B-Protocol
is	O
used	O
to	O
encode	O
binary	O
files	O
such	O
as	O
images	O
within	O
scripts	O
,	O
to	O
avoid	O
depending	O
on	O
external	O
files	O
.	O
</s>
<s>
The	O
data	B-Protocol
URI	I-Protocol
scheme	I-Protocol
can	O
use	O
Base64	B-Protocol
to	O
represent	O
file	O
contents	O
.	O
</s>
<s>
For	O
instance	O
,	O
background	O
images	O
and	O
fonts	O
can	O
be	O
specified	O
in	O
a	O
CSS	B-Language
stylesheet	I-Language
file	O
as	O
data	B-Protocol
:	I-Protocol
URIs	I-Protocol
,	O
instead	O
of	O
being	O
supplied	O
in	O
separate	O
files	O
.	O
</s>
<s>
Although	O
not	O
part	O
of	O
the	O
official	O
specification	O
for	O
SVG	B-Application
,	O
some	O
viewers	O
can	O
interpret	O
Base64	B-Protocol
when	O
used	O
for	O
embedded	O
elements	O
,	O
such	O
as	O
images	O
inside	O
SVG	B-Application
.	O
</s>
<s>
Base64	B-Protocol
can	O
be	O
used	O
to	O
store/transmit	O
relatively	O
small	O
amounts	O
of	O
binary	O
data	O
via	O
a	O
computer	O
's	O
text	O
clipboard	O
functionality	O
,	O
especially	O
in	O
cases	O
where	O
the	O
information	O
does	O
n't	O
warrant	O
being	O
permanently	O
saved	O
or	O
when	O
information	O
must	O
be	O
quickly	O
sent	O
between	O
a	O
wide	O
variety	O
of	O
different	O
,	O
potentially	O
incompatible	O
programs	O
.	O
</s>
<s>
An	O
example	O
is	O
the	O
representation	O
of	O
the	O
public	O
keys	O
of	O
cryptocurrency	O
recipients	O
as	O
Base64	B-Protocol
encoded	O
text	O
strings	O
,	O
which	O
can	O
be	O
easily	O
copied	O
and	O
pasted	O
into	O
users	O
 '	O
wallet	B-Protocol
software	I-Protocol
.	O
</s>
<s>
Binary	O
data	O
that	O
must	O
be	O
quickly	O
verified	O
by	O
humans	O
as	O
a	O
safety	O
mechanism	O
,	O
such	O
as	O
file	B-Algorithm
checksums	I-Algorithm
or	O
key	B-Algorithm
fingerprints	I-Algorithm
,	O
is	O
often	O
represented	O
in	O
Base64	B-Protocol
for	O
easy	O
checking	O
,	O
sometimes	O
with	O
additional	O
formatting	O
,	O
such	O
as	O
separating	O
each	O
group	O
of	O
four	O
characters	O
in	O
the	O
representation	O
of	O
a	O
PGP	B-Application
key	B-Algorithm
fingerprint	I-Algorithm
with	O
a	O
space	O
.	O
</s>
<s>
QR	O
codes	O
which	O
contain	O
binary	O
data	O
will	O
sometimes	O
store	O
it	O
encoded	O
in	O
Base64	B-Protocol
rather	O
than	O
simply	O
storing	O
the	O
raw	O
binary	O
data	O
,	O
as	O
there	O
is	O
a	O
stronger	O
guarantee	O
that	O
all	O
QR	O
code	O
readers	O
will	O
accurately	O
decode	O
text	O
,	O
as	O
well	O
as	O
the	O
fact	O
that	O
some	O
devices	O
will	O
more	O
readily	O
save	O
text	O
from	O
a	O
QR	O
code	O
than	O
potentially	O
malicious	O
binary	O
data	O
.	O
</s>
<s>
Some	O
applications	O
use	O
a	O
Base64	B-Protocol
alphabet	O
that	O
is	O
significantly	O
different	O
from	O
the	O
alphabets	O
used	O
in	O
the	O
most	O
common	O
Base64	B-Protocol
variants	O
(	O
see	O
Variants	O
summary	O
table	O
above	O
)	O
.	O
</s>
<s>
The	O
Uuencoding	B-Device
alphabet	O
includes	O
no	O
lowercase	O
characters	O
,	O
instead	O
using	O
ASCII	B-Protocol
codes	I-Protocol
32	O
(	O
"	O
"	O
(	O
space	O
)	O
)	O
through	O
95	O
("_"	O
)	O
,	O
consecutively	O
.	O
</s>
<s>
Uuencoding	B-Device
uses	O
the	O
alphabet	O
"	O
!	O
"	O
#$%&'( 	O
)	O
*+,-./0123456789:;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_	O
 "	O
.	O
</s>
<s>
Using	O
consecutive	O
ASCII	B-Protocol
characters	I-Protocol
saved	O
computing	O
power	O
,	O
because	O
it	O
was	O
only	O
necessary	O
to	O
add	O
32	O
,	O
without	O
requiring	O
a	O
lookup	O
table	O
.	O
</s>
<s>
BinHex	O
4	O
(	O
HQX	O
)	O
,	O
which	O
was	O
used	O
within	O
the	O
classic	B-Application
Mac	I-Application
OS	I-Application
,	O
excludes	O
some	O
visually	O
confusable	O
characters	O
like	O
'	O
7	O
 '	O
,	O
'	O
O	O
 '	O
,	O
'	O
g	O
 '	O
and	O
'	O
o	O
 '	O
.	O
</s>
<s>
A	O
UTF-8	O
environment	O
can	O
use	O
non-synchronized	O
continuation	O
bytes	B-Application
as	O
base64	B-Protocol
:	O
0b10xxxxxx	O
.	O
</s>
<s>
Unix	B-Application
stores	O
password	O
hashes	O
computed	O
with	O
crypt	B-Algorithm
in	O
the	O
/etc/passwd	O
file	O
using	O
an	O
encoding	O
called	O
B64	O
.	O
</s>
<s>
crypt	B-Algorithm
's	O
alphabet	O
puts	O
the	O
punctuation	O
.	O
</s>
<s>
crypt	B-Algorithm
uses	O
the	O
alphabet	O
"	O
./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz	O
"	O
.	O
</s>
<s>
GEDCOM	O
uses	O
the	O
same	O
alphabet	O
as	O
crypt	B-Algorithm
,	O
which	O
is	O
"	O
./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz	O
"	O
.	O
</s>
<s>
bcrypt	B-Algorithm
hashes	O
are	O
designed	O
to	O
be	O
used	O
in	O
the	O
same	O
way	O
as	O
traditional	O
crypt(3 )	O
hashes	O
,	O
but	O
bcrypt	B-Algorithm
's	O
alphabet	O
is	O
in	O
a	O
different	O
order	O
than	O
crypt	B-Algorithm
's	O
.	O
</s>
<s>
bcrypt	B-Algorithm
uses	O
the	O
alphabet	O
"	O
./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789	O
"	O
.	O
</s>
<s>
Xxencoding	B-Device
uses	O
a	O
mostly-alphanumeric	O
character	O
set	O
similar	O
to	O
crypt	B-Algorithm
,	O
but	O
using	O
+	O
and	O
-	O
rather	O
than	O
.	O
</s>
<s>
Xxencoding	B-Device
uses	O
the	O
alphabet	O
"	O
+	O
-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz	O
"	O
.	O
</s>
<s>
6PACK	O
,	O
used	O
with	O
some	O
terminal	B-Protocol
node	I-Protocol
controllers	I-Protocol
,	O
uses	O
an	O
alphabet	O
from	O
0x00	O
to	O
0x3f	O
.	O
</s>
<s>
Bash	B-Operating_System
supports	O
numeric	O
literals	O
in	O
Base64	B-Protocol
.	O
</s>
<s>
Bash	B-Operating_System
uses	O
the	O
alphabet	O
"	O
0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ	O
@_	O
"	O
.	O
</s>
<s>
One	O
issue	O
with	O
the	O
RFC	O
4648	O
alphabet	O
is	O
that	O
,	O
when	O
a	O
sorted	O
list	O
of	O
ASCII-encoded	O
strings	O
is	O
Base64-transformed	O
and	O
sorted	O
again	O
,	O
the	O
order	O
of	O
elements	O
changes	O
.	O
</s>
<s>
This	O
is	O
because	O
the	O
padding	O
character	O
and	O
the	O
characters	O
in	O
the	O
substitution	O
alphabet	O
are	O
not	O
ordered	O
by	O
ASCII	B-Protocol
character	I-Protocol
value	O
(	O
which	O
can	O
be	O
seen	O
by	O
using	O
the	O
following	O
sample	O
table	O
's	O
sort	O
buttons	O
)	O
.	O
</s>
