Base64 encoder | Encode Data Effortlessly

Convert text and binary data to Base64 with our online encoder. It supports text, images, and files. Paste data or upload files for Base64 output, suitable for HTML, CSS, or data storage.

In your browser Updated 05/2026

Supported file types: All files (max size: 5MB)

How to Use Base64 Encoder

  • 1. Enter text in the input field or select a file to encode
  • 2. Click "Encode Text" or "Encode File" button
  • 3. Copy the resulting Base64 string to use elsewhere
  • 4. Use the clear button to start over

Use this tool from your AI agent

Free JSON API and Model Context Protocol (MCP) server. No signup, no API key, CORS open. Designed for Claude, ChatGPT, Cursor, scripts and frontend apps.

curl -X POST https://mate.tools/api/v1/base64-encode.php \
  -H "Content-Type: application/json" \
  -d '{"text":"hello world","url_safe":false}'
import urllib.request, json

req = urllib.request.Request(
    "https://mate.tools/api/v1/base64-encode.php",
    data=json.dumps({"text":"hello world","url_safe":false}).encode(),
    headers={"Content-Type": "application/json"},
)
with urllib.request.urlopen(req) as r:
    print(json.load(r))
const r = await fetch("https://mate.tools/api/v1/base64-encode.php", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({"text":"hello world","url_safe":false}),
});
console.log(await r.json());

Add to claude_desktop_config.json (Claude Desktop), ~/.cursor/mcp.json (Cursor), or any other MCP-compatible client:

{
  "mcpServers": {
    "mate-tools": {
      "command": "npx",
      "args": ["-y", "@mate-tools/mcp-server"]
    }
  }
}
API documentation OpenAPI 3.1 npm 60 req/min · 600 req/hour · 1 MB body cap

Frequently Asked Questions

Base64 encoding is a method of converting binary or text data into ASCII text format. It's commonly used when you need to transmit binary data over systems that can only reliably handle text content.

You can encode any text content or file (up to 5MB) into Base64 format. This includes plain text, images, PDFs, and other file types.

Base64 encoding is useful for embedding images in HTML/CSS, sending files via email, storing binary data in databases, or transmitting data that might otherwise be altered during transmission.