Base64 Encode / Decode - Auto-Detect + Type Sniffing
Pricing
from $0.32 / 1,000 run operations
Base64 Encode / Decode - Auto-Detect + Type Sniffing
Encode or decode Base64 with auto-detection and content-type sniffing (PNG/JPEG/PDF/JSON/text). Standard or URL-safe. Bulk. $0.0004 per operation; empty input uncharged.
Pricing
from $0.32 / 1,000 run operations
Rating
0.0
(0)
Developer
Broke to Built
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
8 days ago
Last modified
Categories
Share
Base64 Encode / Decode — auto-detect + content-type sniffing
Encode text to Base64 or decode Base64 back, with auto-detection and content-type sniffing on decode (PNG/JPEG/GIF/PDF/ZIP/JSON/text). Standard or URL-safe alphabet. Bulk-capable. $0.0004 per operation. Empty input is uncharged.
What you get
- Auto-detect: valid Base64 is decoded, everything else encoded.
- URL-safe option (
-/_, no padding). - Type sniffing on decode via magic bytes:
image/png,image/jpeg,application/pdf,application/zip,application/json,text/plain… byteLengthof the decoded/encoded payload.- Bulk: up to 50 strings per run.
Input
{ "items": ["Hello, Apify!", "SGVsbG8="], "direction": "auto", "urlSafe": false }
Output (real run, 2026-08-07)
{"ok": true,"direction": "encode","input": "Hello, Apify!","output": "SGVsbG8sIEFwaWZ5IQ==","detectedType": null,"byteLength": 13,"urlSafe": false}
Decoding SGVsbG8= returns { "direction": "decode", "output": "Hello", "detectedType": "text/plain" }.
Pricing — $0.0004 per operation
Priced at the floor. The one comparable on the Apify Store (rixin/base64-encoder-decoder, 2026-08-07) lists its per-operation events unpriced (start fee only), so there is no per-operation competitor price to quote. This actor adds auto-detection and content-type sniffing.
Limits (honest ones)
- Up to 50 items per run.
- Binary decodes are returned as Base64 in the JSON (with
detectedType); text/JSON decodes return the decoded string. - Decoded text output is truncated at 100,000 characters in the record.
FAQ
- Encode and decode? Both — set
direction, or letautodecide. - Does it tell me what a blob is? Yes —
detectedTypesniffs common image/document/text types on decode. - URL-safe Base64? Yes — set
urlSafe: true. - Bulk? Yes — up to 50 strings, one charge each.
Use from code or AI agents
curl -X POST "https://api.apify.com/v2/acts/EliAI~base64-tool/runs?token=YOUR_APIFY_TOKEN" \-H 'content-type: application/json' \-d '{"input":"Hello, Apify!"}'
Callable as an agent tool through the Apify MCP server (mcp.apify.com).
Related actors
- String Encoder & Decoder (
EliAI/string-encoder-toolkit) — multi-format text codec: URL, HTML entities, hex, ROT13, and Unicode escapes (plus base64). Reach for it for non-base64 formats; reach for this actor when you need base64/data-URI decoding with binary content-type sniffing (PNG/JPEG/PDF/ZIP/JSON detection), which the text codec does not do.