How to Use the Base64 Encoder/Decoder

The SnappedKit.com Base64 tool lets you encode text and files to Base64 — and decode Base64 back to its original form — entirely in your browser. No data is ever sent to a server.

Encoding Text

  1. Make sure Text mode and Encode → are selected in the toolbar.
  2. Type or paste your text into the left pane.
  3. The Base64 output appears instantly on the right.
  4. Click Copy to copy the encoded result.

Decoding Base64

  1. Click ← Decode in the toolbar.
  2. Paste your Base64 string into the left pane.
  3. The decoded text appears on the right.

Encoding Files

  1. Switch to File mode using the toolbar.
  2. Drag and drop a file onto the drop zone, or click browse to pick a file.
  3. The file is read entirely in your browser and encoded to Base64.
  4. If the file is an image, a thumbnail preview is shown.
  5. Copy the Base64 output to use as a data URI in HTML or CSS.

URL-Safe Base64

Standard Base64 uses + and / characters, which have special meaning in URLs. Enable the URL-safe checkbox to use - and _ instead, and strip trailing = padding. This is commonly used in JWT tokens, URL parameters, and filenames.

Line Wrapping

Enable Line wrap (76) to break the output into 76-character lines, matching the MIME standard used in email attachments (RFC 2045).

Swap & Download

Use the Swap button to move the output back into the input and automatically flip between encode and decode — useful for round-trip testing. In decode mode, the Download button lets you save decoded binary data as a file.

What is Base64?

Base64 is a binary-to-text encoding scheme that represents binary data using 64 ASCII characters. Every 3 bytes of input become 4 Base64 characters, resulting in roughly 33% size increase. It's widely used to embed images in HTML/CSS, transmit binary data in JSON APIs, encode email attachments, and create data URIs.

Privacy

All encoding and decoding happens locally in your browser using native JavaScript APIs (TextEncoder, FileReader, btoa/atob). Your data never leaves your device.