# Base64 Usage

**URL:** <https://discuss.88.io/t/base64-usage/51>\
**Category:** 88.io\
**Created:** [September 23, 2020, 8:49am UTC](https://discuss.88.io/t/base64-usage/51 "2020-09-23T08:49:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![admin](https://discuss.88.io/user_avatar/discuss.88.io/admin/32/38_2.png) [@admin](https://discuss.88.io/u/admin)\
**Post date:** [September 23, 2020, 8:49am UTC](https://discuss.88.io/t/base64-usage/51/1 "2020-09-23T08:49:17Z")

</div>

The platform makes use of Base64 extensively. It is based on the definition in [RFC4648](https://www.rfc-editor.org/rfc/rfc4648).

# URL Friendly Base64 Standard

All Base64 should be made URL friendly before being transmitted and stored.  
The platform's URL Friendly Base64 standard is as follows:

```auto
+ is changed to -
/ is changed to _
= is removed

```

Note the padding character = is removed since it is always possible to work out whether = or == is needed by expanding the length of the Base64 number into a multiple of 4.

# Base64 to Base16 (Hex)

Conversion table to Base64 for common hex numbers.

```plaintext
32 bits (4 bytes):
base16: ffffffff
base64: /////w==

64 bits (8 bytes):
base16: ffffffffffffffff
base64: //////////8=

128 bits (16 bytes):
base16: ffffffffffffffffffffffffffffffff
base64: /////////////////////w==

192 bits (24 bytes):
base16: ffffffffffffffffffffffffffffffffffffffffffffffff
base64: ////////////////////////////////

256 bits (32 bytes):
base16: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
base64: //////////////////////////////////////////8=

512 bits (64 bytes):
base16: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
base64: /////////////////////////////////////////////////////////////////////////////////////w==

```
