When to use it
Embedding binary in text, stashing API tokens in URLs, or hand-crafting a Basic auth header. Base64 is the standard way to carry bytes that aren't safe as plain ASCII.
How it works
Pick a direction at the top (Encode or Decode), paste into the left
pane, and the result appears on the right live. ↔ Swap sends the
current result back as the next input.
URL-safe option
+ and / collide with URL syntax, so embedding Base64 directly in a
query string breaks. The URL-safe toggle swaps them for - and _
and strips trailing = padding — the flavor used by JWT, OAuth state
parameters, and slug-safe filenames.
Common gotchas
- Unicode / emoji — this tool routes text through a UTF-8 encoder
first, so Korean, emoji, and other non-ASCII characters encode cleanly.
Calling
btoa()directly on them would throwInvalidCharacterError. - "atob failed" — whitespace and newlines are tolerated, but any
character outside
A-Z a-z 0-9 + / =(or- _in URL-safe mode) is rejected.
Tokens · certificates · binary handled in-page
Encode/decode goes through stdlib (`btoa` · `atob`) directly, with URL-safe variant toggle. API keys, client secrets, and PEM certs stay inside the page.