Tool
Base64 encoder and decoder
Turn text or a file into Base64 and back. There's a PowerShell mode that uses the encoding -EncodedCommand actually expects (it isn't UTF-8), and decoding says exactly what's wrong when a string won't decode. Everything happens in your browser.
Nothing you enter here is sent or saved. Privacy policy
Type or paste something on the left and the result shows up here.
Ready to run in PowerShell
Do the same in PowerShell
Good to know
PowerShell's -EncodedCommand wants UTF-16LE, not UTF-8. Encode Get-Process as UTF-8 and PowerShell reads gibberish. PowerShell mode encodes the way it expects, gives you the finished powershell -EncodedCommand ... line, and warns when a command is too long for cmd.exe (8,191 characters).
PowerShell is fussier than most decoders. [Convert]::FromBase64String refuses Base64 with its = padding removed, with URL-safe - and _, or with -----BEGIN----- lines, and its error doesn't say which. This page decodes all of those anyway, tells you what it fixed, and shows the PowerShell to do the same.
Paste a whole command. Decoding a full powershell -e ... line pulls out the payload for you (handy when you're working out what a script does). Never run something you don't understand.
Checked against the real thing. The encoder, the decoder's yes/no verdicts and every PowerShell snippet shown here are tested against PowerShell 7 itself. Older Windows PowerShell may word its errors differently.
Nothing leaves this page. Your text and files aren't sent, saved or put in the address bar. Base64 isn't encryption, so anything you Base64 is as private as the text it came from.