Base64 is a encoding mechanism that encodes binary-to-text. That is binary data is converted to ASCII string format by using radix-65 representation.
Base64 encoding works by translating the data into a radix-64 representation. That means all input characters is converted to a choose 64 chracters that can be easily printed as text. Mostly it uses A-Z, a-z, 0-9, + & /. = character is used for padding in base64 encoding
Base64 encoding is used to transmit binary format data(or files) across channels that only suports text contents. It is mostly used in Web pages for embedding image files and other binary files. Also used for sending attachements in emails.
Check below for the simple example:
Input:
this is base64 encoding example.
Output:
dGhpcyBpcyBiYXNlNjQgZW5jb2RpbmcgZXhhbXBsZS4=
Almost all programming languages provides base46 encoding functions.
php base64 encoding: base64_encoding($input_binary)
Python base64 encoding: base64.b64encode(input_string_bytes)
Javascript base64 encoding: btoa(stringToEncode)
Using the smalldev.tools base64 encoding online feature you can easily convert input text or images to base64
Yes, this base64 encoder is safe & secure. We do not save any of your data in server. Neither the data is visible to any 3rd party.
To decode base64 encoded string use this smalldev.tools base64 decoder online