Base64 Encode & Decode
By Miikka · CalcBrew · Updated
Encoded output
How Base64 works
The encoder reads the input as bytes (UTF-8 for text), takes them three at a time — 24 bits — and splits those into four 6-bit numbers from 0 to 63. Each number maps to one character of the alphabet A–Z a–z 0–9 + /. “Hi” is the bytes 72 and 105, which is why it becomes SGk=: two bytes fill only 16 of 24 bits, so the last character is padding.
Hello, World! → SGVsbG8sIFdvcmxkIQ==
{"ok":true} → eyJvayI6dHJ1ZX0=
user:pa55word → dXNlcjpwYTU1d29yZA== (HTTP Basic auth)
Where you meet it: data URIs for inline images (src="data:image/png;base64,…"), JSON Web Tokens (three URL-safe Base64 segments separated by dots), email attachments (MIME, wrapped at 76 characters), Authorization: Basic headers and Kubernetes secrets.
Frequently asked questions
Cite this calculator
CalcBrew. (2026). Base64 Encode & Decode Online. https://calcbrew.com/base64-encoder“Base64 Encode & Decode Online.” CalcBrew, 2026, calcbrew.com/base64-encoder.Link to https://calcbrew.com/base64-encoder. Results are estimates; cite the underlying formula or data source for academic work.
Related tools
More in Developer Tools · All tools & games