Base64 Encoder Decoder

Encode and decode Base64 text, with local previews for PNG, JPEG, GIF, and WebP image data.

Client-side only Nothing stored No account needed
Updated for 2026 Last verified July 2026

Results update when you run the tool.

Output will appear here.
Ask an AI to explain this result
Share this result

This tool processes the selected input in your browser. Review the output before relying on it; format and file behavior can vary by browser and source data.

Your inputs and results stay in this browser. This page may send privacy-bounded aggregate interaction events described in Privacy; it does not send your entered values or result contents.

Use this result

Share the current inputs or ask ChatGPT to explain the calculation in context.

More options
Report a calculation issue
Direct answer

What does this calculator estimate?

'Hi' encodes to 'SGk=': every 3 input bytes become 4 base64 characters from the A-Za-z0-9+/ alphabet, padded with '=' to a multiple of 4. Decoding 'SGk=' returns 'Hi'.

  • Base64 turns 3 bytes into 4 characters of 6 bits each (Wikipedia).
  • The '=' padding pads the output to a multiple of 4 characters.
  • Base64 is an encoding, not encryption; anyone can decode it.

What base64 is for

Base64 encodes binary data as safe ASCII text — used to embed images in HTML/CSS, transmit binary in JSON and email, and store binary in text-only systems. It's not encryption; it's a transport encoding.

Limitations to watch for

Base64 inflates data by ~33% (4 chars per 3 bytes), so it's wasteful for storage. It's reversible by anyone — never use it for secrets. URL-safe variants replace +/ with -_ for use in URLs.

How to use it in practice

Use it to embed small images inline (data URIs), send binary in JSON payloads, or debug API tokens. Decode base64 to inspect the original content. For large files, the browser handles them locally.

['Paste text or drop a file.', 'Choose encode or decode.', 'Copy the result.']

Transparent methodology

How this calculator works

Reviewed 2026-08-25 · BoringToolsKit Editorial Team

Formula

Encoding: each 3 bytes of input become 4 base64 characters (6 bits each) from the A–Za–z0–9+/ alphabet, padded with '=' to a multiple of 4. Decoding reverses the process.

Worked example

'Hi' encodes to 'SGk='. Decoding 'SGk=' returns 'Hi'.

Assumptions to verify

  • Standard base64 alphabet and padding are used.
  • The input is valid base64 when decoding.
  • File handling is supported by the browser.

Frequently asked questions

What is base64?

An encoding that turns binary data into ASCII text using 64 characters, so it can travel through text-only channels (email, JSON, URLs).

How do I encode text?

Paste it and choose encode. 'Hi' becomes 'SGk='.

Is base64 encryption?

No — it's a reversible encoding. Anyone can decode it, so never use it for secrets.

Why is base64 bigger than the original?

It uses 4 characters per 3 bytes — about 33% overhead.

What is the '=' padding for?

It pads the output to a multiple of 4 characters when the input isn't a multiple of 3 bytes.

Can I encode images?

Yes — drop a file to get its data URI (useful for inline images in HTML).

What is URL-safe base64?

A variant that swaps + and / for - and _ so the output works in URLs without escaping.

Cite this tool

BoringToolsKit. “Base64 Encoder Decoder.” boringtoolskit.com/base64-tool/ (reviewed 2026-08-25). Free to reference in articles, syllabi, and answer posts with a link.

Privacy: Inputs and results stay in this browser. Any future sponsored recommendation or advertisement will be clearly labeled and kept separate from the calculation.