svg2all

Encode file as Base64

Turns any file into Base64 text or a data URL for HTML, CSS and JSON.

Runs in your browser – your file is never uploaded

Loading tool …

Frequently asked questions

Is my file uploaded?

No. The conversion runs entirely in your browser. The file never leaves your device – there is no server that could see it. Once the page has loaded, the tool even works offline.

What is a data URL and when do I need one?

A data URL embeds the file directly in HTML, CSS or JSON: “data:image/png;base64,iVBOR…”. Paste it into an <img src>, a CSS url(…) or a JSON field and no separate file request is needed. Useful for small icons and inline previews.

Why is the output larger than the file?

Base64 stores 3 bytes as 4 characters, so the text is about 33 % bigger than the file. That is fine for small icons; for large images it is usually better to link the file.

What is the line wrap for?

E-mail (MIME) and PEM certificates expect Base64 in lines of 76 characters. Leave it off for data URLs and JSON, where the string must stay unbroken.