Base64 is a group of similar binary-to-text encoding schemes that represents binary data in an ASCII string format by translating it into radix-64 representation.
All examples below uses base64 decoded text (eWVhaGh1Yg==) for simplicity, but this is not a typical use case, as it can already be safely transferred across all systems that can handle Base64.
Suggested Read: How To Encode Base64 In Most Popular Programming Languages
Encoded Format
eWVhaGh1Yg==
The result of above decoded string is “yeahhub“.
Using the below base64 examples which actually turns your encoded data into binary data.
In Python Language –
import base64
print base64.b64decode(“eWVhaGh1Yg==”)
In Windows PowerShell –
PS > [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String(“eWVhaGh1Yg==”))
In Perl Language –
use MIME::Base64;
print decode_base64(“eWVhaGh1Yg==”);
print “\n”;
In Bash Language –
echo `echo eWVhaGh1Yg== | base64 –decode`
In PHP Language –
<?php
echo base64_decode(“eWVhaGh1Yg==”);
?>
In Javascript Language –
<p id=”result”></p>
<script>
document.getElementById(“result”).innerHTML = atob(“eWVhaGh1Yg==”);
</script>
In MySQL Language –
use mysql;
SELECT FROM_BASE64(‘eWVhaGh1Yg==’);
In Ruby Language –
You may also like:require “base64”
decoded_string = Base64.decode64(‘eWVhaGh1Yg==’)
puts decoded
- Most Common DNS Record Types and Their Roles
- Top Skills Needed to Become a Cybersecurity Analyst
- Mastering Windows Management with WMIC Commands – Top 20 Examples
- Edit and Compile Code with the Best 5 Code Editors
- 50+ Top DevSecOps Tools You Need To Know
- Learn How to Add Proxy and Multiple Accounts in MoreLogin
- Some Useful PowerShell Cmdlets
- Create Free SSL Certificate – ZEROSSL.COM [2020 Tutorial]
- Generate Self-Signed SSL Certificate with OPENSSL in Kali Linux
- RDP – CredSSP Encryption Oracle Remediation Solution 2020