Skip to content
Sealpaste

Delete all recent work?

This removes the 0 items saved in this browser. Your settings stay.

Stop saving recent work?

New work won't be saved in this browser. The 0 items already saved can stay or go.

File & Image to Base64

Text instead
File
Drop files hereor . Images show a preview. Up to 20 files, 100 MB in all.
Base64
The Base64 text shows here.
Ready
Runs in your browser. Nothing you paste is uploaded unless you share it.

Convert files or images up to 100 MB to Base64 or a data: URL, with img and CSS snippets

Turn an image, PDF or any file into Base64 or a data: URL, ready to paste into HTML, CSS or a JSON request body.

How to use it

  1. Open a file, or drop it on the box. Several files (up to 20) are encoded together, each with its own Copy, and Download saves them as one JSON list.
  2. Keep "Data URL" on to get data:image/png;base64,… for use in src or url(). Turn on URL-safe for a value that goes in a URL.
  3. Copy the result, or download it as a .txt file. For an image with Data URL on, copy a ready <img> tag or CSS background-image line. With Data URL off, 76-character lines break the Base64 into MIME lines (LF, or CRLF).

Example

Inline a small icon in CSS

Input
icon.png (1.2 KB)
Result
data:image/png;base64,iVBORw0KGgo…

Paste it into CSS as background-image: url("…"), or into an img src.

When a data URL makes sense

Inlining saves a request for tiny assets like icons in emails or single-file HTML. Base64 is about 33% larger than the file itself, so for anything over a few kilobytes a normal file is usually faster.

APIs that accept files in JSON (for example document or image uploads) often want plain Base64 without the data: prefix; leave "Data URL" off for those.

Questions

Is there a file size limit?
Up to 100 MB, for one file or several together; more is not read, which keeps the page quick. The file is read from your disk by the browser and is not sent over the network.
Can I make the image smaller before encoding?
Yes. Under Before encoding, set a width in pixels (the height follows) and a format: PNG, JPEG or WebP, with a quality from 1 to 100 for JPEG and WebP. The image is redrawn in your browser and the new file is encoded; the file panel shows its size. JPEG has no transparency, so transparent parts become white.
Is my data or file uploaded?
No. Everything runs in your browser, so your data stays on your device. Nothing you paste is uploaded unless you share a result, which is locked with your password first. That includes files you open.

Related tools