convert

Base64

Encode any file to Base64 text or decode Base64 back to bytes.

Loading…

About Base64

Base64 encodes any file into Base64 text and decodes Base64 back into the original bytes. Use it to embed an image as a data URL, paste a binary into a JSON config, or recover a file from an encoded string. Encoding and decoding run in your browser, so nothing you paste or upload leaves your device.

Category
convert
Input
Accepts: */*.
Output
Outputs: text/plain.
Cost
Free, runs in your browser
Memory
low
Privacy: Base64 runs entirely on your device. Files you provide never leave your browser — no uploads, no server, no tracking. The page works offline once loaded.

Common uses

  • Encode a small icon to a data URL so you can inline it in CSS or HTML
  • Decode a Base64 string from a config file back into the original file
  • Embed a certificate or key blob into a JSON or YAML field as text
  • Turn a binary attachment into pasteable text for a system that only accepts strings
  • Inspect the raw bytes behind a Base64 payload by decoding it
  • Encode a font or sound file for inlining into a single-file web page

Frequently asked questions

What can I encode?

Any file type at all. Base64 operates on raw bytes, so images, PDFs, fonts, and binaries all encode and decode cleanly.

Can it produce a data URL?

Yes. Base64 is the encoding behind data URLs, so the encoded output can be wrapped into a data: URI for inlining in web pages.

Is my file uploaded during encoding?

No. Encoding and decoding happen in your browser. The file's contents never leave your device, which matters for keys and certificates.

Why is the encoded text larger than the original?

Base64 represents 3 bytes of data with 4 text characters, so encoded output is roughly one-third larger. That overhead is the cost of making binary safe to paste as text.

Will decoding restore the exact original file?

Yes. Base64 is lossless, so decoding valid Base64 reproduces the original bytes exactly.

Keywords

  • base64
  • encode
  • decode
  • binary
  • text
  • data-url

Try next