convert

Base64 Encode

Encode any file into a Base64 text string.

Runs on your deviceBatch ready

Add a file

JSON, XML, text or any file you want to encode, decode or hash.

Drop a file here
Drag and drop, or choose files

Choose an output

Encode any file into a Base64 text string.

About Base64 Encode

This tool reads any file as raw bytes and outputs its standard Base64 representation as a single line of text. Base64 maps every 3 bytes to 4 printable characters, so binary data such as images, certificates or ZIP files can travel through systems that only handle text.

When it helps

  • Embedding a small image or font in JSON, YAML or an API request body.
  • Storing a certificate, keystore or binary secret in an environment variable or a Kubernetes Secret.
  • Attaching a file to an email or webhook payload that requires Base64 content.

Tips

  • Expect the output to be about one third larger than the input, plus padding.
  • The output uses the standard alphabet with + and / and = padding, with no line wrapping. Some systems, like PEM files, expect lines of 64 characters, and URLs need the URL-safe variant with - and _.
  • If you want something you can drop straight into an img src or CSS url(), use File to Data URI, which adds the data: prefix and MIME type.

Good to know

Quick answers about base64 encode in your browser.

No. Base64 is an encoding, not encryption. Anyone can decode it instantly without a key, so it hides nothing. Use real encryption if the content is sensitive.

Padding. Base64 works in 3-byte groups, and when the input length is not a multiple of 3, one or two = characters fill out the last 4-character block.

Yes. There is no sign-up, no watermark and no limit on how many files you process.

No. Files are read and processed locally in your browser, so they never leave your device.

Related tools