🌐
DI-MGT
di-mgt.com.au › base64-for-windows.html
Base64 utility for Windows
The latest version is 1.3.1 compiled ... a version of base64.exe compiled for a 64-bit X64 platform. To install, just copy the file base64.exe to a folder on your Windows PATH, for example C:\Windows....
🌐
GitHub
github.com › RickStrahl › Base64
GitHub - RickStrahl/Base64 · GitHub
You can also set up another one to convert a file to Base64 on the clipboard which is useful for other use cases: Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\Base64] "Command"="C:\\Users\\rstrahl\\Dropbox\\admin\\Base64.exe" @="Convert to Base64 and place on Clipboard" [HKEY_CLASSES_ROOT\*\shell\Base64\command] @="C:\\Users\\rstrahl\\Dropbox\\admin\\Base64.exe \"%1\" -c"
Author   RickStrahl
🌐
Microsoft Store
apps.microsoft.com › detail › 9n3rq9xhf43g
Base64 Encode Decode - Download and install on Windows | Microsoft Store
June 24, 2021 - Base64 Encode Decode is a tool software that encode string to base64 string and decode base64 string to string.
🌐
SourceForge
sourceforge.net › projects › base64-for-windows
Base64 for Windows download | SourceForge.net
Download Base64 for Windows for free. Encode and Decode Base64 Files or STDIN. The MIME (Multipurpose Internet Mail Extensions) specification (RFC 1341 and successors) defines a mechanism for encoding arbitrary binary information for transmission by electronic mail.
🌐
Microsoft Store
apps.microsoft.com › detail › 9nrcx6bwwlzf
Base64 Decode & Encode - Download and install on Windows | Microsoft Store
December 4, 2025 - Tired of searching for reliable Base64 encoding tools online? Base64 Decode & Encode brings fast, secure, and offline conversion right to your Windows desktop. Whether you're a developer embedding data in code, a system administrator handling configuration files, or a data analyst processing ...
🌐
Microsoft Store
apps.microsoft.com › detail › 9p7ztwvxv1k9
Base64 Encoding Wizard - Download and install on Windows | Microsoft Store
March 6, 2024 - This app provides a Wizard interface to convert free text or files into various base64 representations. This might be for use as an HTML img tag, An embedded markdown image or simply the raw encoding.
🌐
Microsoft Store
apps.microsoft.com › detail › 9npmhxz9h1pb
Base64: Offline & private converter - Free download and install on Windows | Microsoft Store
August 4, 2025 - Convert your data with maximum speed and privacy thanks to this completely offline Base64 converter. Developed in native C++, the app offers exceptional performance without requesting any permissions or collecting any data, so your data always remains under your control.
🌐
Microsoft Store
apps.microsoft.com › detail › 9mx3h9pvxcds
Base64 Decoder & Encoder - Download and install on Windows | Microsoft Store
This is a lightweight UWP app that can help you encode texts to base64 string and decode it back!
🌐
Chocolatey
community.chocolatey.org › packages › base64
Chocolatey Software | Base64 encoder/decoder 1.0.0
July 26, 2020 - chocolatey_package 'base64' do action :install source 'INTERNAL REPO URL' version '1.0.0' end
Find elsewhere
🌐
PowerShell Gallery
powershellgallery.com › packages › Base64 › 1.0.4
PowerShell Gallery | Base64 1.0.4
December 1, 2016 - Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More · Deploy to Azure Automation · Manually download the .nupkg file to your system's default download location.
🌐
Glarity
askai.glarity.app › search › How-can-I-install-Base64-on-Windows
How can I install Base64 on Windows? - Ask and Answer - Glarity
1. **Using Base64.exe**: Copy the file `base64.exe` to a folder on your Windows PATH, like `C:\Windows` [1]. 2. **Chocolatey**: Run `choco install base64` from the command line or PowerShell [3].
🌐
Craftsman Nadeem
reachmnadeem.wordpress.com › 2021 › 01 › 01 › base64-encoding-and-decoding-using-openssl-in-windows
Base64 Encoding And Decoding Using Openssl in Windows | Craftsman Nadeem
January 1, 2021 - Install Openssl in Windows choco install openssl E:\base64>openssl base64 -help Usage: base64 [options] Valid options are: -help Display this summary -list List ciphers -ciphers Alias for -list -in infile Input file -out outfile Output file -pass val Passphrase source -e Encrypt -d Decrypt -p Print the iv/key -P Print the iv/key and exit -v Verbose…
🌐
Google Groups
groups.google.com › g › nodejs › c › jw73p5z3Yg8
How to install base64 module on Windows
December 30, 2011 - command "D:\\Networking\\nodejs\\\\node.exe" "D:\\Networking\ \nodejs\\n ode_modules\\npm\\bin\\npm-cli.js" "install" "base64" npm ERR! cwd D:\WorkSpace\vnc.js npm ERR! node -v v0.6.6 npm ERR! npm -v 1.1.0-beta-4 npm ERR! code ELIFECYCLE npm ERR! message bas...@2.0.3 install: `node-waf configure build` npm ERR! message `cmd "/c" "node-waf configure build"` failed with 1 npm ERR! npm ERR! Additional logging details can be found in: npm ERR! D:\WorkSpace\vnc.js\npm-debug.log npm not ok It seems that there isn't a command named node-waf on Windows, I need some help.
🌐
Medium
medium.com › @murilothebr › how-to-base64-encode-and-decode-from-command-line-in-windowns-95077fa13b4c
How to base64 encode and decode from command-line in Windowns | by Murilothebr | Medium
August 23, 2023 - How to base64 encode and decode from command-line in Windowns In this tutorial, we will learn how and why to use base64 encode from the command-line on Windowns using my own Base64 converter. You …
🌐
Appsvoid
appsvoid.com › products › base64-tool
Perform Common Base64 Tasks with Base64 Tool | Appsvoid
June 5, 2023 - All of this can be done from this simple Windows OS application with ease. ... There are many online tools to perform base64 tasks, we wanted to create a simple Windows OS application to perform common base64 encoding and decoding tasks offline. This tool can come in handy if you need to frequently encode a file in base64 or convert a base64 encode string back into its original file (such as PNG, JPG; PDF, MP3, MP4, etc).
Top answer
1 of 11
71

Here's a PowerShell one-liner you can run from a cmd console that'll Base64 encode a string.

powershell "[convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes(\"Hello world!\"))"

It's probably not as fast as npocmaka's solution, but you could set a console macro with it.

doskey btoa=powershell "[convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes(\"$*\"))"
doskey atob=powershell "[Text.Encoding]::UTF8.GetString([convert]::FromBase64String(\"$*\"))"

btoa Hello world!
btoa This is fun.
btoa wheeeeee!
atob SGVsbG8gd29ybGQh

Be advised that doskey doesn't work in batch scripts -- only the console. If you want do use this in a batch script, make a function.

@echo off
setlocal

call :btoa b64[0] "Hello world!"
call :btoa b64[1] "This is fun."
call :btoa b64[2] "wheeeeee!"
call :atob b64[3] SGVsbG8gd29ybGQh

set b64
goto :EOF

:btoa <var_to_set> <str>
for /f "delims=" %%I in (
    'powershell "[convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes(\"%~2\"))"'
) do set "%~1=%%I"
goto :EOF

:atob <var_to_set> <str>
for /f "delims=" %%I in (
    'powershell "[Text.Encoding]::UTF8.GetString([convert]::FromBase64String(\"%~2\"))"'
) do set "%~1=%%I"
goto :EOF

Or if you'd prefer a batch + JScript hybrid:

@if (@CodeSection==@Batch) @then
@echo off & setlocal

call :btoa b64[0] "Hello world!"
call :btoa b64[1] "This is fun."
call :btoa b64[2] "wheeeeee!"
call :atob b64[3] SGVsbG8gd29ybGQh

set b64
goto :EOF

:btoa <var_to_set> <str>
:atob <var_to_set> <str>
for /f "delims=" %%I in ('cscript /nologo /e:JScript "%~f0" %0 "%~2"') do set "%~1=%%I"
goto :EOF

@end // end batch / begin JScript hybrid code
var htmlfile = WSH.CreateObject('htmlfile');
htmlfile.write('<meta http-equiv="x-ua-compatible" content="IE=10" />');
WSH.Echo(htmlfile.parentWindowWSH.Arguments(0).substr(1)));

Edit: batch + VBScript hybrid for @Hackoo:

<!-- : batch portion
@echo off & setlocal

call :btoa b64[0] "Hello world!"
call :btoa b64[1] "This is fun."
call :btoa b64[2] "wheeeeee!"
call :atob b64[3] SGVsbG8gd29ybGQh

set b64
goto :EOF

:btoa <var_to_set> <str>
:atob <var_to_set> <str>
for /f "delims=" %%I in ('cscript /nologo "%~f0?.wsf" %0 "%~2"') do set "%~1=%%I"
goto :EOF

: VBScript -->
<job>
    <script language="VBScript">
        Set htmlfile = WSH.CreateObject("htmlfile")
        htmlfile.write("<meta http-equiv='x-ua-compatible' content='IE=10' />")
        if WSH.Arguments(0) = ":btoa" then
            WScript.Echo htmlfile.parentWindow.btoa(WSH.Arguments(1))
        else
            WScript.Echo htmlfile.parentWindow.atob(WSH.Arguments(1))
        end if
    </script>
</job>
2 of 11
64

According to the comments on the question, you can use certutil. e.g.,

certutil -encode raw.txt encoded.txt

or

certutil -f -encode raw.txt encoded.txt

The -f means "force overwrite". Otherwise you will get an error if the output file (encoded.txt above) already exists.

However, this will format the output into the encoded.txt file as if it were a certificate PEM file, complete with BEGIN and END lines, and split lines at the character max. So you would need to do further processing in a batch scenario, and a bit of extra work if the strings are long at all.

Top answer
1 of 4
15

the usual windows way to generate a base 64 string is

Make any file (here simple text but can be PDF, docX or whatever.)

echo Hello World!>input.ext

Convert to base64

certutil -encodehex -f "input.ext" "output.txt" 0x40000001 1>nul

to see the result use

type output.txt
SGVsbG8gV29ybGQhDQo=

To send to another command use a pipe to use the TYPE output.txt as input. However like many conversion tasks it needs to be a file IO. To avoid any hint of a hard drive file, it would need a memory file system.

For looping a folder use a for loop with variables to suit

to decode output.txt

certutil -decode -f output.txt output.ext 1>nul

type output.ext

Hello World!

Answer

There is a very small (7.5 kB) downloadable exe c 2015 that can be used to encode/decode to file or console. You can try to download direct in a curl command like this but it must be 7680 bytes.

>curl -O https://master.dl.sourceforge.net/project/base64/b64.exe?viasf=1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7680  100  7680    0     0  12070      0 --:--:-- --:--:-- --:--:-- 12132

>b64.exe

  b64      (Base64 Encode/Decode)    Bob Trower 2001/08/03
           (C) Copr Bob Trower 1986-2015     Version 0.94R
  Usage:   b64 -option [-l<num>] [<FileIn> [<FileOut>]]
  Purpose: This program is a simple utility that implements
           Base64 Content-Transfer-Encoding (RFC1113).
           Use -h option for additional help.

>

Thus use is very simple:

b64 -e input.ext

Result on screen or use in a pipe

SGVsbG8gV29ybGQhDQo=

Note that's exactly the same as above however there has been no update as to most recent query about why it may not always work inbound as expected, but this is an outbound usage.

example of open issue

echo Hello World!|b64 -e

not an accurate result compared to above but an acceptable troughput SGVsbG8gV29ybGQhCg==

so when using

echo SGVsbG8gV29ybGQhCg==|b64 -d

It does correctly report

Hello World!

The reason for the difference is the last EOL
0000000C: 0A 0D
And depending on circumstances, may or may not be a material difference. Also note that command lines are limited in working length, so console usage is also limited for string handling too

2 of 4
5

I suggest to install OpenSSL on your Windows machine. After you set the PATH variable it's easy as:

type <file_name> | openssl base64