Free Tool v1.0 · Client-side · Private

Base64
Encoder / Decoder

Encode text & images to Base64 or decode Base64 back — 100% in your browser, nothing sent to any server.

0 chars
Output
Encoded output will appear here…

FAQ

Frequently Asked Questions
What is Base64 encoding? +

Base64 is a binary-to-text encoding scheme that converts binary data into a string of printable ASCII characters. It uses a set of 64 characters — A–Z, a–z, 0–9, +, and / — plus = for padding.

Every 3 bytes of input become 4 Base64 characters, making the encoded output roughly 33% larger than the original data.

Why is Base64 used? +

Base64 is used wherever binary data must travel through systems designed for text. Common use cases include:

  • Email attachments — MIME encoding embeds images and files in email bodies.
  • Data URLs — Inline images in HTML/CSS (src="data:image/png;base64,…").
  • JSON payloads — Embedding binary blobs in JSON APIs.
  • JWT tokens — The header and payload sections of JSON Web Tokens are Base64URL encoded.
  • Cryptography — Storing and transmitting public/private keys and certificates.
Is this tool secure? Is my data sent anywhere? +

Completely secure. All encoding and decoding happens entirely in your browser using native JavaScript APIs (btoa(), atob(), and the FileReader API). No data is ever transmitted to any server.

You can even disconnect from the internet and the tool will continue to work perfectly — it's fully self-contained once loaded.

What is the difference between Base64 and Base64URL? +

Standard Base64 uses + and / which are reserved characters in URLs. Base64URL replaces these with - and _ so the output is URL-safe, and often omits the = padding.

Base64URL is commonly used in JWTs, OAuth tokens, and URL parameters. If you need to decode a JWT, paste only the header or payload segment (not the full token).

How do I embed a Base64 image in HTML or CSS? +

Use the Data URL format output by this tool:

<img src="data:image/png;base64,iVBORw0KGgo…" />

For CSS, use the CSS background-image format:

.element {
  background-image: url("data:image/png;base64,iVBORw0KGgo…");
}

Switch the output format selector above the encoded result to get the exact format you need.

Does Base64 encrypt my data? +

No. Base64 is an encoding, not an encryption. It is trivially reversible by anyone with a decoder. Never use Base64 to protect sensitive data — use proper encryption algorithms (AES, RSA, etc.) instead. Base64 only makes binary data text-safe for transport; it provides zero security.

What file types can be encoded as Base64? +

Any file can be Base64 encoded — it's simply a way to represent any bytes as text. This tool supports image encoding directly via the Image tab. For other file types (PDF, audio, video, etc.) you can use the browser's developer console or a server-side tool. The text tab can also handle any UTF-8 text content including HTML, JSON, XML, SVG markup, and code.