You can easily convert PKCS#12 pfx files to Base64 strings using the new Windows Terminal.
Windows Terminal includes Powershell Core and the following commands enable you to create the Base64 string of your certificate archive binary.
$fileContentBytes = get-content ‘C:\Certificates\Client.pfx’ -AsByteStream
This command creates a byte array of the binary pfx file.
[System.Convert]::ToBase64String($fileContentBytes) | Out-File ‘C:\Certificates\Client_Pfx_Base64.txt’
This command converts bytes to the Base64 string and writes it to the Client_Pfx_Base64.txt file.
Hope it helps!