Convert UTF-8 text to Base64 or decode Base64 back to readable text. Choose standard Base64 or the URL-safe Base64URL alphabet; your input is processed locally in this browser.
What is Base64?
Base64 is a binary-to-text encoding that represents bytes with 64 printable ASCII characters. It lets binary data travel through text-oriented systems, but it is reversible and provides no encryption or confidentiality. The standard alphabet and its URL-safe variant are defined by RFC 4648.
Quick example: the UTF-8 text Hello encodes to SGVsbG8=. Decoding SGVsbG8= returns Hello.
Standard Base64 versus Base64URL
| Format | Alphabet ending | Padding | Typical use |
| Standard Base64 | + and / | = normally included | Email, data URLs, text payloads |
| Base64URL | - and _ | Often omitted when length is known | URLs, filenames, JWT segments |
Common uses of Base64 encoding
- Email Attachments: Base64 is used to encode attachments in email systems (MIME) to ensure safe transmission of binary files.
- Web Development: Embedding images directly in HTML/CSS using Data URIs.
- API Integration: Sending binary data in JSON payloads.
- Data Storage: Storing binary data in text-based storage systems.
How to use this Base64 tool
- Choose a format: Leave Base64URL off for standard Base64, or enable it for URLs, filenames, and JWT-style values.
- Encode: Paste text and select “Encode to Base64.” The tool first converts Unicode text to UTF-8 bytes.
- Decode: Paste a Base64 string and select “Decode to text.” The decoded bytes must be valid UTF-8.
- Copy Results: Use the "Copy" button to copy the result to your clipboard.
- Clear: Reset both fields and the status message.
What this text decoder does not do
This page converts text only. If decoded bytes represent an image, ZIP archive, PDF, or another binary file, they may not be valid UTF-8 and this tool will report an error instead of corrupting them. Use the image encoder to encode an image as a data URL.
Best Practices for Base64 Usage
- Base64 turns each 3 input bytes into 4 characters, so complete groups add about one third before line wrapping or transport overhead.
- Base64 is encoding, not encryption or compression. Do not use it to hide passwords, tokens, or personal data.
- Use the alphabet required by the protocol; standard Base64 and Base64URL are distinct encodings.
- For a detailed explanation of bytes, padding, and alphabets, read what Base64 is and how it works.
Technical references: RFC 4648 defines the encodings, while MDN’s Base64 guide documents browser behavior and Unicode handling.