Skip to content
NSNormandin SystemsTHE EVERYDAY TOOLBOXMain site
⇌

Converters / YOUR EVERYDAY TOOLBOX

Base64 file converter

Convert a string, file, or image into its base64 representation.

✓ Free to use✓ No account neededHow to use this tool ↓
YOUR WORKSPACESee an example ↗

Opening your tool…

Runs in your browser. Check important results and keep a copy of your original files.

THE PRACTICAL GUIDE · NORMANDIN SYSTEMS

Get more from Base64 file converter

Base64 file converter converts file bytes to Base64 text. Base64 represents binary bytes using printable characters, which is useful when a text-only interface must carry a small file. Base64 increases size and provides no confidentiality. A data URL may include a media-type prefix that is separate from the Base64 payload. Check whether the receiving field expects raw Base64 or a complete data URL, and preserve the original file extension when decoding. Use the worked example to understand what a successful result looks like, then compare it with a small sample of your own input. Keep the original available until you have checked the output in its destination. Conversion establishes a representation; it does not establish that the underlying information is correct or that the receiving application accepts every supported feature.

Guide updated October 13, 2026

How to use this tool

  1. To encode a file, use the File to Base64 section and choose a small source file. Its bytes are converted to text; the original file is unchanged.
  2. Choose whether to include the data URI prefix. This option is enabled initially. Disable it when the destination expects only the Base64 payload, as in the worked example.
  3. Copy the encoded result and compare its prefix and length with the receiving application’s requirements. Avoid adding spaces or newlines to a payload unless its protocol permits them.
  4. To decode instead, use the Base64 to file section, enter the encoded content, choose the output filename and extension, and use its download control. Compare the reconstructed bytes with the source.

SEE IT IN PRACTICE

A worked example

EXAMPLE INPUT
A file containing exactly Hello, with no trailing newline; disable Include data URI prefix
RESULT / WHAT TO EXPECT
SGVsbG8=

With Include data URI prefix disabled, the five ASCII bytes become SGVsbG8=. The initially enabled prefix option produces a complete data URL instead. Adding a newline changes the payload.

Payload length and data URLs

Base64 expands each group of three bytes into four characters, with padding used for incomplete final groups under the usual convention. A data URL adds a prefix describing its media type and encoding. Compare the prefix requirement with the receiving field; accidentally including it where raw Base64 is expected can make an otherwise correct payload fail decoding.

Reconstruct the original file

Decoding Base64 reconstructs bytes, but the bytes do not necessarily supply a filename or usable extension. Keep the original media type and filename separately when a workflow needs them. To verify a file conversion, compare its decoded length and, for an exact check, a hash of the original and reconstructed files. Opening an image successfully is useful but weaker evidence: a viewer may tolerate extra data or ignore damaged metadata.

When this tool is useful

  • Prepare small embedded-file examples while retaining a separate copy of the source.
  • Use a small example to troubleshoot binary-versus-text transport issues and identify a representation mismatch.
  • Create file payloads for a text interface without manually rewriting every field or symbol.

Tips for a better result

  • Base64 increases size and provides no confidentiality. A data URL may include a media-type prefix that is separate from the Base64 payload.
  • Check whether the receiving field expects raw Base64 or a complete data URL, and preserve the original file extension when decoding.
  • After changing formats, compare meaningful values rather than whitespace alone. Read the Base64 text output with its intended parser when exact types or escaping matter.

Frequently asked questions

Does Base64 compress a file?

No. It generally expands three input bytes into four text characters, before any additional data-URL prefix.

Should I copy the data-URL prefix?

The Include data URI prefix option is enabled initially. Leave it enabled only when the destination expects a complete data URL. Turn it off for raw Base64 payloads such as the worked example.

How can I verify a decoded file?

Compare its byte length and a cryptographic file hash with the original. A matching hash is stronger evidence than a successful preview.

What happens to the information I enter?

The utility processes your input in this browser. Some tools retain field values in browser storage or the URL; avoid entering secrets in shareable fields. Page and asset requests still go to the hosting provider. Read the privacy and offline-use notes for details.