yigityalim
projectshandbookslabshireshare
xgithub
siteprojectshandbookslabschangelog
aboutusesnowhireshare
elsewherexgithublinkedinemail
metarssllms.txtsitemap
© 2026 Yiğit Yalım. All rights reserved.
/
Back to Labs
May 10, 2026·data

Base64 Encoder / Decoder

Bidirectional text ↔ base64. Standard and URL-safe variants, one-click direction swap. UTF-8 safe (handles non-ASCII characters).

base64 · encoding · web

JWT parts, data URIs, image embedding, basic auth headers — base64 is everywhere. This lab does instant text ↔ base64 conversion with URL-safe variant support.

Base64Tool
base64 · 20 B · +43% overhead
SGVsbG8sIEJhc2U2NCE=

Standard vs URL-safe

CharStandardURL-safe
++-
//_
= (padding)requireddropped

URL-safe is defined in RFC 4648 §5. Cookie values, URL paths/queries, JWT headers all need it because + and / are reserved characters.

UTF-8 trap

btoa("é") → InvalidCharacterError, because btoa expects Latin-1 (8-bit). For UTF-8 strings, encode to bytes via TextEncoder.encode() first, then base64. The lab does this automatically — Turkish, Chinese, emoji all work.

PreviousAEAD Tamper DemoNextChaCha20 Inner State Stepper