Developer Tools

Tools for developers

Base64 Encode / Decode

Encode or decode Base64 strings

Base64 Encode/Decode is an online tool that converts text or binary data to and from Base64 encoding.

Base64 is a way to represent binary data using only 64 ASCII characters (letters, digits, plus, slash). It is commonly used to embed images in HTML, send binary data in JSON or URLs, and store credentials. Decoding converts a Base64 string back to the original text or data.

This tool is useful for developers working with APIs, data URIs, or any system that requires Base64-encoded strings. All processing happens in your browser; nothing is sent to a server.

1. Paste your text or Base64 string into the input area above.

2. Click Encode to convert the text to Base64. Non-ASCII characters (e.g. emoji, Chinese) are encoded as UTF-8 first.

3. Click Decode to convert a Base64 string back to readable text. Invalid Base64 will show an error.

4. Copy the result from the output area. Use Decode to verify encoded output or to read stored Base64 data.

Plain text

Hello, World!

Base64 (decodes to 'ToolBaseHub')

VG9vbEJhc2VIdWI=

Text with emoji

Test 👍

Base64 encoding converts binary data into a string of ASCII characters. Each group of 3 bytes (24 bits) is split into 4 groups of 6 bits, and each 6-bit value is mapped to a character in the Base64 alphabet (A–Z, a–z, 0–9, +, /).

Padding with = is used when the input length is not a multiple of 3. Base64 is not encryption; it can be decoded by anyone. Use it for transport or storage, not for hiding sensitive data.

In JavaScript, btoa() encodes and atob() decodes; this tool uses the same behavior and supports UTF-8 text via encoding/decoding the Unicode string correctly.

Encode when: embedding small images as data URIs (e.g. in HTML or CSS), sending binary data in JSON, storing credentials in config files, or preparing data for APIs that expect Base64.

Decode when: reading Base64 from an API response, inspecting data URIs, or converting stored Base64 back to text or binary for use in your application.

Many APIs use Base64 for file uploads or inline content; this tool helps you generate or verify the encoded strings quickly.