Base64 Encode And Decode Online

Base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. The term Base64 originates from a specific MIME content transfer encoding.

Now how to encode and decode strings or any file to Base64 format. Following is a simple tool that can encode and decode Strings, image or any file to Base64 format.

OR
Loading...

Any text that you enter, or we generate is not stored on this site, this tool is provided via an HTTPS URL to ensure that any data cannot be stolen.

If you appreciate this tool, then you can consider donating.

We are thankful for your never ending support.

Base64 Encoding

Base64 encoding is used to convert binary data into a text string using a set of 64 different ASCII characters. It's often used to encode data for transmission over media that are designed to deal with text.

Example in Python

To encode a string in Base64:

                                    import base64

                                    # Original string
                                    original_string = "Hello, World!"

                                    # Encode the string
                                    encoded_bytes = base64.b64encode(original_string.encode("utf-8"))
                                    encoded_string = encoded_bytes.decode("utf-8")

                                    print(encoded_string)

                                

Base64 Decoding

Base64 decoding reverses the process of encoding, converting the Base64 encoded string back into its original binary form.

Example in Python:

To decode a Base64 string:

                                    import base64

                                    # Base64 encoded string
                                    encoded_string = "SGVsbG8sIFdvcmxkIQ=="

                                    # Decode the string
                                    decoded_bytes = base64.b64decode(encoded_string)
                                    decoded_string = decoded_bytes.decode("utf-8")

                                    print(decoded_string)

                                

References