Tools
Base64 beside the file
A card on the Tools page writes a file's Base64 text next to it, and turns that text back into the file.
#Using it
- Drop any files on the card, or press Choose files… (or Enter on the card). A file becomes
name.ext.base64.txtbeside it. A.base64.txtfile becomes the original again, beside it, with its own extension. - Several files run one after another, with a progress bar, the file being worked on, and Cancel. Folders are left as they are.
- Nothing is overwritten: a name that is taken gets a number, as Windows does (
photo (1).jpg). - Each result is written to a temporary file first and only counts when a SHA-256 round trip matches: the decoded bytes must hash the same as the original file. A file that does not match is removed and the reason is shown.
- Each result has Show (selects it in File Explorer) and Undo (moves it to the Recycle Bin). Undo refuses when the file changed since it was written.
#What decoding accepts
The standard and the URL-safe alphabets, line breaks and other white space, missing padding, and a data: URL prefix. Anything else stops with the exact byte where the text stops being Base64.
#In a browser
The project site has a Base64 page that does the same in a browser. A web page cannot write beside your file, so there each result is a download.
#Records
Every file written and every undo is added to the Records page under Actions and discarded changes.
#Checks
tests/SmartTests/Base64Checks.cs runs on any machine: the text goes beside the file in the standard encoding with no temporary file left; a second encode is numbered and leaves the first untouched; decoding gives back the same bytes and the original extension without overwriting the original; URL-safe, wrapped, unpadded text with a data: prefix decodes; a stray character is refused and nothing is written; and a cancel leaves no new file and the source untouched.
View this article's Markdown source on GitHub
Suggested articles
- Records
Actions and discarded changes
The Actions and discarded changes card on the Records page lists, newest first, what the app did that you might want to see or take back:
Read it Local history for scripts and the commit message
Every save of a shortcut script keeps a versioned copy, and so does every save of the default commit message template. Nothing is uploaded.
Read itLive check
the parts that only mean something against the real thing. It uses a throwaway data folder, so the real settings are
Read itDrawing and annotation
Open it from Tools: a blank board, an image file, or the newest picture in clipboard history. Annotating never changes the original image.
Read it