Base64 encoding scheme using 64-character alphabet to represent binary data in ASCII string format. Commonly used for email attachments, data URLs, and web APIs. Educational implementation following RFC 4648 standard.
| Property | Value |
|---|---|
| Category | Encoding Schemes |
| Sub-category | Base Encoding |
| Security status | 🎓 Educational Only |
| Complexity | Beginner |
| Inventor | Privacy-Enhanced Mail (PEM) Working Group |
| Year | 1993 |
| Origin | 🌐 International |
| Source | algorithms/encoding/base64.js |
Status: 🎓 Educational Only
No vulnerabilities are recorded for this implementation.
7 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.
Vector 1 — Base64 empty string test - RFC 4648
| Field | Value |
|---|---|
input |
(empty) |
expected |
(empty) |
Vector 2 — Base64 single character test - RFC 4648
| Field | Value |
|---|---|
input |
66 |
expected |
5a673d3d |
Vector 3 — Base64 two character test - RFC 4648
| Field | Value |
|---|---|
input |
666f |
expected |
5a6d383d |
Vector 4 — Base64 three character test - RFC 4648
| Field | Value |
|---|---|
input |
666f6f |
expected |
5a6d3976 |
Vector 5 — Base64 four character test - RFC 4648
| Field | Value |
|---|---|
input |
666f6f62 |
expected |
5a6d397659673d3d |
Vector 6 — Base64 five character test - RFC 4648
| Field | Value |
|---|---|
input |
666f6f6261 |
expected |
5a6d3976596d453d |
Vector 7 — Base64 six character test - RFC 4648
| Field | Value |
|---|---|
input |
666f6f626172 |
expected |
5a6d3976596d4679 |