# File to Base64

> File to Base64 encodes any file at all: a Word document, a ZIP, an audio clip, a font or a spreadsheet. Free, no sign-in. Works on phone and computer.

Page: https://ishowpdf.com/tools/file-to-base64

## What File to Base64 does

File to Base64 encodes any file at all: a Word document, a ZIP, an audio clip, a font or a spreadsheet. It is the general version of our Base64 encoders, for when you need a file as text and that file is not a PDF or a picture.

The result can be plain Base64 or a data: link carrying the file type your device reports. If your device does not know the type, the link uses application/octet-stream. Copy the text, or download it as a .txt file named after your original file.

## How to use File to Base64

1. **Choose any file**: There is no restriction on the kind of file you pick.
2. **Set the output**: Keep or remove the data: prefix with the tick box.
3. **Take the text**: Copy it, or download it to keep or send.

## Questions

**Can I convert a font file to Base64 for CSS?**

Yes. Choose the .woff2 or .ttf file and use the data: link inside the src of a @font-face rule.

**How do I decode the file again?**

Paste the text into Base64 to file. It rebuilds the original bytes and names the file by its type where it can.

**Does encoding change my file?**

No. Base64 is a lossless way of writing bytes as text, so decoding gives back an identical copy.

**Is there a file size limit?**

The tool sets none, but a very large file makes very long text, which can make your browser slow.

More free tools: https://ishowpdf.com/tools
