# Faster Base64 Encoding and Decoding Using AVX2 Instructions

**Authors:** Wojciech Mu{\l}a, Daniel Lemire

arXiv: 1704.00605 · 2026-04-07

## TL;DR

This paper presents a highly efficient implementation of base64 encoding and decoding using AVX2 SIMD instructions, significantly outperforming existing methods.

## Contribution

It introduces a new AVX2-based approach that accelerates base64 encoding and decoding by approximately 10x and 7x respectively, while conforming to standards.

## Key findings

- Encoding speed increased by ~10x
- Decoding speed increased by ~7x
- Software is freely available online

## Abstract

Web developers use base64 formats to include images, fonts, sounds and other resources directly inside HTML, JavaScript, JSON and XML files. We estimate that billions of base64 messages are decoded every day. We are motivated to improve the efficiency of base64 encoding and decoding. Compared to state-of-the-art implementations, we multiply the speeds of both the encoding (~10x) and the decoding (~7x). We achieve these good results by using the single-instruction-multiple-data (SIMD) instructions available on recent Intel processors (AVX2). Our accelerated software abides by the specification and reports errors when encountering characters outside of the base64 set. It is available online as free software under a liberal license.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1704.00605/full.md

## Figures

31 figures with captions in the complete paper: https://tomesphere.com/paper/1704.00605/full.md

## References

32 references — full list in the complete paper: https://tomesphere.com/paper/1704.00605/full.md

---
Source: https://tomesphere.com/paper/1704.00605