Encode and Decode Base64 for Text, Files, and Data URIs avatar

Encode and Decode Base64 for Text, Files, and Data URIs

Pricing

from $1.00 / 1,000 items processed

Go to Apify Store
Encode and Decode Base64 for Text, Files, and Data URIs

Encode and Decode Base64 for Text, Files, and Data URIs

Encodes or decodes Base64 for pasted text, files or image links. Auto-detect, URL-safe, and image URL to data URI. $0.001 per unique item. Failed items free. Works from Apify MCP and the API.

Pricing

from $1.00 / 1,000 items processed

Rating

0.0

(0)

Developer

Tidy Byte Tools

Tidy Byte Tools

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

9 hours ago

Last modified

Features

Limited permissions

Share

Base64 Encode & Decode

Encode or decode Base64 for pasted text or files. Optional URL-safe form and data-URI output.

Encode or decode Base64. $0.001 per unique item. Failed items are free. Works from Apify MCP and the API.

Try it free: Apify gives every account $5 of free credit each month (no card), which covers about 5,000 one-item runs of this tool.

Also searched as: ES: codificar y decodificar Base64 / PT: codificar e decodificar Base64 / DE: Base64 kodieren und dekodieren / FR: encoder et décoder en Base64 / JA: Base64エンコード・デコード / ZH: Base64编码解码

Example (real run, Nov 17, 2026)

Input:

{ "texts": "hello world", "action": "encode" }

Output (one dataset item):

{ "action": "encode", "base64": "aGVsbG8gd29ybGQ=", "bytesIn": 11, "ok": true, "type": "text", "source": "pasted" }

Image URL to data URI: put an image link in fileUrls and turn on dataUri. A real run on a 44,891-byte JPEG returned "mime": "image/jpeg" and a dataUri that starts with data:image/jpeg;base64,/9j/4AAQ..., ready to paste into HTML or CSS.

{ "fileUrls": ["https://www.gstatic.com/webp/gallery/1.jpg"], "action": "encode", "dataUri": true }

Also searched as: ES: codificar base64, decodificar base64 / PT: codificar base64, decodificar base64 / DE: Base64 kodieren, Base64 dekodieren / FR: encoder en base64, décoder en base64 / JA: Base64エンコード、Base64デコード

Example

Input: the text hello world, action encode.

Output from an actual run: aGVsbG8gd29ybGQ= (11 bytes in). Decoding that same string gives hello world back.

Free local version

A free local CLI and MCP server is on GitHub. It runs on your computer and does not fetch file links.

Input

  • Paste one or more texts (split them with a line that is only ---)
  • Or add file links
  • Action: auto (default), encode, or decode
  • Optional URL-safe alphabet (- and _)
  • Optional data-URI string when encoding

Output

One dataset row per unique item. Encoded rows include the Base64 string (and a data URI if you asked). Decoded rows include UTF-8 text when the bytes are text, and a file in the key-value store for both text and binary.

Price

You pay $0.001 per unique text or file we save. Failed items, blanks and repeats in the same run are free. There is no start fee from us. Apify adds its normal small platform cost.

Honest limits

  • auto looks at whether the input looks like Base64. Short or unusual strings can be guessed wrong. Use encode or decode when you already know the direction.
  • Decoding a binary file that is not Base64 text returns an error and is not charged.
  • We do not fetch extra URLs and we do not inspect the decoded bytes for viruses.

Integrations: API, webhooks, n8n, Make and Zapier

Run it and get the results in one call. Save your input as input.json:

{
"texts": "hello world"
}
curl -X POST "https://api.apify.com/v2/acts/tidybytetools~base64-encode-decode/run-sync-get-dataset-items" \
-H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" -d @input.json

Python:

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("tidybytetools/base64-encode-decode").call(run_input={...}) # same fields as input.json
items = client.dataset(run["defaultDatasetId"]).list_items().items

Webhook when a run finishes. Open the Actor's Integrations tab, or create one with the API (POST https://api.apify.com/v2/webhooks):

{"eventTypes": ["ACTOR.RUN.SUCCEEDED", "ACTOR.RUN.FAILED"],
"condition": {"actorId": "JDseNxaptmKZKGuGI"},
"requestUrl": "https://your-server.example/apify-hook"}

Your server gets the run ID and dataset ID, then reads GET https://api.apify.com/v2/datasets/{datasetId}/items.

No-code: use the official Apify app in n8n ("Run an Actor and get dataset"), Make or Zapier, pick tidybytetools/base64-encode-decode, and paste the same input.

AI agents (MCP): add https://mcp.apify.com/?tools=tidybytetools/base64-encode-decode to Claude, Cursor or any MCP client.

Safe to retry: it only reads what you send it and changes nothing on other sites, and bad or missing fields come back as clear warnings instead of a crash.

FAQ

Works from Apify MCP? Yes. Search for "base64 encode" or "base64 decode".

Use it from an AI agent (Apify MCP)

An AI agent in Claude, Cursor or any client with the Apify MCP server can find this Actor by searching for "Base64 Encoder & Decoder API" and call it as tidybytetools/base64-encode-decode. Input and output are plain JSON. Example input:

{
"texts": "hello world"
}

The run returns the dataset rows described above.