Base64 Encode / Decode
Encode text to Base64 or decode Base64 back to text — all in your browser.
How to use
- Paste or type your input.
- Choose Encode or Decode.
- Copy the result with one click.
How the Base64 Encode / Decode works
Converts text to and from Base64, the encoding used to carry binary data through channels that only handle text — data URIs, email attachments and JSON payloads.
Base64 takes three bytes (24 bits) at a time and re-splits them into four 6-bit groups, each mapped to one of 64 safe characters. When the input is not a multiple of three bytes, '=' padding fills the gap.
3 bytes → 4 characters, so output is about 133% the size of the input
Worked example
'Hello' encodes to SGVsbG8=. The trailing '=' shows the final group was short of a full three bytes.
Things worth knowing
- Base64 is an encoding, not encryption. Anyone can decode it instantly — never use it to hide sensitive data.
- It inflates size by roughly a third, which is why inlining large images as data URIs often hurts page weight more than it saves requests.
- URL-safe Base64 swaps + and / for - and _ so the value can sit in a query string unescaped.
Frequently asked questions
Is my text uploaded anywhere?
No — encoding and decoding happen entirely in your browser.
What is Base64 used for?
It encodes binary or text data as ASCII, common in data URLs, email and APIs.
Is Base64 secure?
No. It provides zero confidentiality. It exists to make binary data survive text-only transport.
Why does the output end in one or two equals signs?
Padding. It signals that the last group encoded only one or two bytes rather than a full three.