Base64 Encoder/Decoder
Encode plain text to Base64 or decode Base64 strings back to readable text. Free online encoder and decoder.
What is Base64 Encoding/Decoding?
Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. The Base64 Encoder/Decoder allows you to convert plain text to Base64 encoded strings and decode Base64 strings back to readable text. This is essential for data transmission over media designed to deal with text, such as email via MIME, storing complex data in JSON or XML, and embedding images in HTML or CSS.
Base64 encoding works by taking binary data and converting it into a radix-64 representation using 64 different characters (A-Z, a-z, 0-9, +, /). The = character is used for padding. This encoding ensures that data remains intact without modification during transport.
How to Use This Tool
- Enter your text in the input field or paste a Base64 string to decode.
- Click Encode to convert your text to Base64 format.
- Click Decode to convert Base64 back to readable text.
- Use the copy button to copy the result to your clipboard.
Common Use Cases
- Data URIs: Embed images directly in HTML or CSS using Base64 data URIs.
- API Development: Encode binary data for transmission in JSON APIs.
- Email Attachments: MIME encoding uses Base64 for email attachments.
- HTTP Basic Authentication: Credentials are encoded in Base64 for HTTP Basic Auth headers.
Convert other file formats with the Image to Base64, Base64 to Image Converter, or HTML To Base64 Converter. JWT header and payload sections also use Base64URL — decode them with the JWT Decoder & Verifier.
Related security & developer tools
Decode and verify tokens with the JWT Decoder & Verifier, encrypt sensitive strings using Encrypt Decrypt, generate keyed digests with the HMAC Generator, or browse all Encoding & Encryption tools and Developer Tools.
Frequently Asked Questions
Is Base64 encoding secure?
No, Base64 is not encryption. It is encoding, meaning it can be easily reversed by anyone. Do not use Base64 to protect sensitive data. For encryption, use proper encryption algorithms like AES.
Why does Base64 output end with = signs?
The = sign is padding added to make the output length a multiple of 4 characters. It indicates how many bytes were added to complete the final block. One = means 1 byte of padding, two == means 2 bytes.