Output formats

How to export Base64 to a text file on a Mac

You can do this with B64 in one keystroke. Here is when exporting beats copying, and what the file contains.

The clipboard is fine for a string you are about to paste. It is a poor container for two and a half megabytes of text you want to keep, attach or check into a repository. For that, write a file.

Export a result

  1. Encode the file

    Load your image or PDF in Encode (⌘1) as usual.

  2. Choose the format and wrapping

    Whatever you pick is what gets written. A plain result can be wrapped at 64 or 76 columns; the wrapping is preserved in the file.

  3. Export

    Press ⌘E, or click Export…. Choose a name and a location — somewhere like /Users/you/Documents/payloads/ — and the complete result is written as a .txt file.

Export always writes everything

A long result is shown in pages so the window stays responsive, but that is a display choice. Export writes the complete string, every time, regardless of which page you happen to be looking at.

When to export rather than copy

  • The result is large. Several megabytes through the clipboard is slow and pointless if the destination is a file anyway.
  • You want to keep it. A payload you will use again, attach to a ticket, or commit alongside a test.
  • Something in between normalises whitespace. Chat clients and web forms rewrite text. A file arrives as it left.
  • You want it in a repository. A checked-in fixture is a file, not a paste.

What the file contains

Exactly what the result pane shows: the complete output in the format you chose, with the wrapping you chose, and nothing added. A plain export is only Base64 characters; a data URI export begins with its prefix; an HTML export is the tag.

That matters because the file is round-trippable: drop it back onto Decode and the picture comes back, whichever of the five formats you wrote.

Very large sources

Above a certain size B64 offers to encode straight to a file rather than building the whole result in memory first. Accept it — the bytes are written directly, and nothing has to hold a hundred megabytes of text just so a preview can show you the first screen. See encoding a large image.

Exporting a whole folder at once

Batch (⌘3) writes one text file per source, all into a folder you name, in a single pass — with an optional checksum manifest covering the run. See how to save all batch results to a folder.

Troubleshooting

The exported file looks truncated

It is not — check the size against the character count shown in the app. What you are probably seeing is a viewer that renders only the first part of a very long line.

I need a different extension

The content is plain text whatever it is called. Rename the file afterwards if the destination expects something else.

Where did my export go?

Wherever you pointed the save panel. It defaults to the last place you saved something, which on a first run is usually your Documents folder.

Frequently asked questions

Does Export write the whole result, even when it is shown in pages?

Yes, always. Paging is a display choice so the window stays responsive; Export and Copy both use the complete string.

What is in the exported file?

Exactly what the result pane shows — the chosen format, with the chosen wrapping, and nothing added. Drop the file back onto Decode and the picture comes back.

Should I export or copy?

Export for anything large, anything you want to keep, and anything that has to survive a system that rewrites whitespace. Copy for a string you are about to paste.

Can I export a whole folder of results at once?

Yes — Batch writes one text file per source into a folder you name, with an optional checksum manifest.