Batch conversion

How to convert a folder of images to Base64 on a Mac

You can do this with B64 in one pass. Here is how the direction is worked out, what the results look like, and where they end up.

Encoding files one at a time is fine for one or two. For an icon set, an export folder or a directory of product shots, you want to drop the folder in once and come back to a folder of results.

This guide covers the Batch workspace in B64: adding sources, reading the list, and exporting everything at once.

Note

A batch run happens entirely on your Mac. A thousand files are read from your disk, converted in the app and written back to your disk — nothing is uploaded, and the run works with the network switched off.

Convert a folder

  1. Open Batch

    Click Batch in the sidebar or press ⌘3.

  2. Add the folder

    Drag it onto the Batch area, or click Choose Files or Folders… (⇧⌘O). You can add a folder, a selection of files, or any mix of the two — and you can add more without starting again.

  3. Let it scan

    Results stream in as they are found, with a progress indicator and a Cancel button. Your Mac stays responsive throughout, and cancelling actually stops it.

  4. Review what came back

    Each row shows a thumbnail, the file name, its path and its size. An orange N skipped pill appears if anything was not convertible — click it to see exactly what and why.

  5. Export everything

    Click Export All as Base64… and give the results a folder. B64 creates it and writes one text file per source inside.

The direction is worked out for you

There is no encode-or-decode switch. B64 looks at what you dropped in:

How Batch decides which way to go
You addBatch sets up
Images and PDFsAn encode run — each file becomes Base64 text
Base64 text filesA decode run — each file becomes an image
A folder of eitherThe run that matches what is inside it
A mix of files and foldersThe run that matches the convertible contents

The direction is shown as a small tag beside the folder name, so you can confirm at a glance that it read the situation the way you meant it.

What you get out

One .txt file per source, named after it — logo@2x.png becomes logo@2x.txt — written into the folder you named. A run over /Users/you/Projects/site/img/ might produce:

The exported folder
/Users/you/Projects/site/img-base64/
├── logo@2x.txt
├── sprite-sheet.txt
├── favicon-512.txt
├── hero-banner.txt
└── checksums.txt        ← if the manifest is switched on

Each text file holds the result in your current output format, with your current wrapping. Set both in B64 ▸ Settings… ▸ General before a large run so you do not have to do it again.

Nothing disappears quietly

A folder of pictures usually has other things in it — a .DS_Store, a text file, a stray archive. Those are reported as skipped, with the reason, rather than passed over in silence.

Why this matters on a big run

A run over a thousand files that quietly converts nine hundred and sixty is worse than one that refuses forty loudly. Click the skipped pill and read the list before you move on — see how to see which files were skipped.

Working with individual results

  • Double-click a row to open that file in Encode and work with it properly — change its format, read it, export it on its own.
  • Right-click a row to save just that result, or reveal the source in the Finder.
  • Clear (⌘⌫) empties the workspace when you are done.

How big a folder can this handle?

Thousands of files in a single pass, streaming as they go rather than loading everything first. See how to batch convert thousands of images for what to expect at that scale and how to keep a very large run manageable.

Troubleshooting

It set up a decode when I wanted an encode

The folder's convertible contents are Base64 text files rather than images. Check the direction tag beside the folder name, and check you dropped in the folder you meant.

Files I expected are not listed

Click the skipped pill. Files are skipped for a stated reason, and the reason is usually that the bytes are not an image or a PDF whatever the extension says.

Subfolders

Dropping a folder takes what is in it. If your images are spread across subdirectories, add those folders too — Batch accepts any number of sources.

I need to stop it

Cancel stops the run where it is. Anything already converted stays in the list.

Frequently asked questions

Do I have to tell it whether to encode or decode?

No. Images and PDFs set up an encode; Base64 text files set up a decode; a folder is judged on what is inside it. The direction is shown as a tag beside the folder name.

What do the exported files look like?

One .txt file per source, named after it, in the folder you choose — plus a checksum manifest if you have that switched on.

Does it include subfolders?

Dropping a folder takes what is in it. Add the subfolders as extra sources if your images are spread across several.

What happens to files that are not images?

They are listed as skipped, with the reason. Nothing is silently dropped.