Base64 Converter avatar

Base64 Converter

Pricing

Pay per event

Go to Apify Store
Base64 Converter

Base64 Converter

This actor encodes and decodes Base64 strings. Supports encode, decode, or both modes. Validates Base64 input and reports byte length. Useful for data transformation pipelines and bulk encoding/decoding.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Categories

Share

Encode and decode Base64 strings in bulk.

What does Base64 Converter do?

This actor encodes and decodes Base64 strings in bulk. It supports encode, decode, or both modes, validates Base64 input, and reports byte length for each string processed.

Whether you need to prepare data for safe transport over HTTP, embed binary content in JSON, or reverse-engineer encoded payloads, Base64 Converter handles it in a single API call with clean, structured JSON output.

Use cases

  • Backend developer preparing binary data for safe embedding in JSON or XML payloads
  • QA engineer decoding Base64-encoded tokens or cookies during API testing
  • Data engineer transforming large batches of strings in an ETL pipeline before loading into a data warehouse
  • Security analyst decoding suspicious Base64 payloads found in logs or emails
  • DevOps engineer encoding configuration values or secrets for environment variables and CI/CD pipelines

Why use Base64 Converter?

  • Batch processing -- encode or decode hundreds of strings in a single run instead of one at a time
  • Structured JSON output -- every result includes the original input, encoded/decoded value, validity flag, byte length, and any error details
  • Three modes -- choose encode, decode, or both to get exactly the output you need
  • Validation built in -- automatically checks whether input is valid Base64 before attempting to decode
  • API and integration ready -- call via the Apify API, schedule recurring runs, or connect to Zapier, Make, and other platforms
  • Pay-per-event pricing -- you only pay for what you use, starting at $0.0005 per string

Input parameters

ParameterTypeRequiredDefaultDescription
stringsstring[]Yes--List of strings to encode or decode
modestringNoencodeOperation mode: encode, decode, or both
{
"strings": ["hello world", "SGVsbG8gV29ybGQ="],
"mode": "both"
}

Output example

Each input string produces a result object with the following fields:

FieldTypeDescription
inputstringThe original input string
encodedstringBase64-encoded value (when mode is encode or both)
decodedstringDecoded value (when mode is decode or both and input is valid Base64)
isValidBase64booleanWhether the input is valid Base64
byteLengthnumberByte length of the input string
errorstringError message if conversion failed, otherwise null
{
"input": "hello world",
"encoded": "aGVsbG8gd29ybGQ=",
"decoded": null,
"isValidBase64": false,
"byteLength": 11,
"error": null
}

How much does it cost?

EventPriceDescription
Start$0.035One-time per run
String converted$0.0005Per string converted

Example costs:

  • 10 strings = $0.035 + (10 x $0.0005) = $0.04
  • 100 strings = $0.035 + (100 x $0.0005) = $0.085
  • 1,000 strings = $0.035 + (1,000 x $0.0005) = $0.535

Using the Apify API

You can start Base64 Converter programmatically from your own applications using the Apify API. Below are examples in Node.js and Python.

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('automation-lab/base64-converter').call({
strings: ['hello world', 'encode this too'],
mode: 'encode',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_TOKEN')
run = client.actor('automation-lab/base64-converter').call(run_input={
'strings': ['hello world', 'encode this too'],
'mode': 'encode',
})
items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)

Integrations

Base64 Converter works with the full Apify integration ecosystem. You can connect it to a wide range of automation platforms and data destinations:

  • Make (formerly Integromat) -- trigger a Base64 encoding run as a step in a multi-tool scenario
  • Zapier -- connect to thousands of apps and automatically encode or decode data flowing through your zaps
  • n8n -- use the Apify node in n8n workflows for self-hosted automation pipelines
  • Slack -- send encoded/decoded results to a Slack channel for team visibility
  • Google Sheets -- export results directly to a spreadsheet for review or further processing
  • Amazon S3 -- store output datasets in S3 buckets for archival or downstream data lake ingestion
  • Webhooks -- send results to any HTTP endpoint for real-time processing

You can also schedule recurring runs on the Apify platform to process new data on a timer.

Tips and best practices

  • Use both mode for mixed input -- if your list contains a mix of plain text and Base64-encoded strings, use both mode to get encoded and decoded values for every entry at once.
  • Check isValidBase64 in results -- before using the decoded value downstream, verify this flag is true to avoid processing garbage output.
  • Keep batch sizes reasonable -- while the actor handles large lists, splitting very large jobs (10,000+ strings) into smaller batches makes it easier to retry on failure.
  • Combine with other actors -- chain Base64 Converter with Hash Generator or JSON Validator in a pipeline for complete data transformation workflows.
  • Use decode mode to verify encoded values -- if you receive Base64 strings from an external source, run them through decode mode to confirm they contain the expected content.

FAQ

Can I decode binary data like images with this actor? This actor works with text strings. It will decode any valid Base64 string into its UTF-8 text representation, but it does not output binary files like images or PDFs.

What happens if I try to decode a string that is not valid Base64? The result will have isValidBase64 set to false, the decoded field will be null, and the error field will contain a descriptive message explaining the issue.

Is there a limit on how many strings I can process? There is no hard limit. The actor processes strings sequentially, so very large batches will simply take longer. You are billed per string converted.

Does the actor support URL-safe Base64? The actor uses standard Base64 encoding (with + and / characters). If you need URL-safe Base64 (using - and _ instead), you can do a simple find-and-replace on the encoded output in your downstream code.

What character encoding is used for encoding? The actor encodes input strings using UTF-8 encoding before converting to Base64. This means multibyte characters (e.g., accented letters, CJK characters) are fully supported and will produce longer Base64 output than ASCII-only strings.

Can I use Base64 Converter on a schedule? Yes. You can schedule the actor on the Apify platform to run at regular intervals. This is useful if you have a recurring data source that needs encoding or decoding on a timer (e.g., processing new configuration files daily).