How fast can browsers process base64 data?

Safari wins the reading race, Chrome wins writing — Firefox crawls

TLDR: A benchmark shows Chrome fastest at encoding, Safari fastest at decoding, while Firefox/Servo are painfully slow. The community erupted: Google’s V8 is already fixing decode speed, people joked about JavaScript ignoring spaces, and fans debated why Firefox lags and where the real optimization magic is

Daniel Lemire dropped a chart and the browser fandoms immediately turned it into a speed dating show for Base64 — the tech that turns files into safe text. His benchmark says Chrome/Edge/Brave sprint at encoding, Safari is the surprise champ at decoding, and Firefox/Servo… bring up the rear at a very public jog. Cue the popcorn. The hottest twist? A Googler showed up with a V8 JavaScript engine change that removes a wasteful temporary buffer, likely doubling Chrome’s decode speed. Fans are already calling it the “Lemire provoked a patch” moment. Meanwhile, a commenter discovered that JavaScript literally ignores spaces in Base64 strings, prompting “wait, why?” jokes and the classic “JS never ceases to surprise” eye-roll. Safari stans are celebrating a rare chart where their browser wins at “reading,” while Chromium loyalists flex the faster “writing” numbers and promise a decode comeback. Firefox folks are asking, why so slow? and getting only shrugs for now. One old-school dev even bragged that shoving an image as Base64 over a websocket beat their regular HTTP route back in the day — peak hacker energy. And the performance diehards are craving Lemire’s trademark SIMD (a speed trick) magic, wondering where the secret sauce is. Drama, fixes, memes — we’ve got it all, plus a very speedy future on the horizon thanks to one viral benchmark

Key Points

  • Browsers now offer Uint8Array.toBase64() and Uint8Array.fromBase64() for Base64 encoding/decoding in JavaScript.
  • Daniel Lemire benchmarked Base64 throughput across browsers on an Apple M4 using 64 KiB blocks.
  • Encoding: Chrome/Edge/Brave ~19 GB/s; Safari/SigmaOS ~17 GB/s; Firefox/Servo ~0.34 GB/s.
  • Decoding: Safari/SigmaOS ~9.4 GB/s; Chrome/Edge/Brave ~4.6 GB/s; Firefox/Servo ~0.40 GB/s.
  • Chromium’s slower decoding is attributed to V8 decoding via a temporary buffer before copying; speeds exceed typical disk/network throughput.

Hottest takes

"JS never ceases to surprise" — danhau
"v8 changed yesterday to avoid the temp buffer which will likely double the base64 decode speed" — adzm
"Does anyone know why Firefox/Servo are so slow compared to the rest?" — tasn
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.