Base64 Encode

Convert text or files to Base64 format for safe transmission via email, API, JSON, or embedding in code. Instant processing right in your browser.

Decode Base64

When you need Base64 encoding

Sending files via API

REST and GraphQL APIs typically work with JSON, which doesn't support binary data directly. Base64 lets you send images, documents, or any file as a regular string in the request body.

Embedding resources in code

Small images, icons, and fonts can be encoded in Base64 and embedded directly in HTML or CSS. This reduces HTTP requests and speeds up page loading for small files.

How the Base64 algorithm works

Input data is split into groups of 3 bytes (24 bits). Each group is divided into 4 parts of 6 bits each. Every 6 bits are converted to one of 64 alphabet characters. If input isn't a multiple of 3 bytes, = characters are added for padding.

Web development applications

Data URIs for images and fonts in CSS, binary data transmission via WebSocket, file storage in browser localStorage, JWT token creation for authentication, file uploads via FormData in AJAX requests.

Optimization tip

Only embed files up to 5-10 KB via Base64. For larger images, use regular links — browsers cache them more efficiently than repeated Base64 strings in CSS or HTML.

How to encode data to Base64

1

Enter text or upload a file

Select the "Text" tab and enter your data, or upload a file via the "File" tab. Files up to 10 MB of any format are supported.

2

Start encoding

Click "Encode to Base64". Conversion happens instantly in your browser — no data is sent to our servers.

3

Copy or download result

Use the "Copy" button for clipboard or "Download" to save as a text file. The result is ready to use in your code or API.

Frequently Asked Questions