Base64 Encode / Decode - Auto-Detect + Type Sniffing
Pricing
from $0.32 / 1,000 run operations
Base64 Encode / Decode - Auto-Detect + Type Sniffing
Encodes text to Base64 or decodes Base64 back, with auto-detected direction and a standard or URL-safe alphabet, up to 50 strings per run. Returns the result, its byte length and, on decode, the sniffed content type (PNG, PDF, JSON...). For developers, integration engineers and security analysts.
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
14 days ago
Last modified
Categories
Features
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" }.
Example
A real run on 2026-10-31 with the input this page's form is prefilled with:
{"input": "Hello, Apify!"}
It finished in 2 seconds and returned 1 result. It was charged for 1 operation-run event ($0.0004 on the Free plan). The first result (long text and lists cut for display):
{"ok": true,"direction": "encode","input": "Hello, Apify!","output": "SGVsbG8sIEFwaWZ5IQ==","detectedType": null,"byteLength": 13,"urlSafe": false}
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.
Who uses it
- Developers decoding Base64 blobs from API responses and learning whether they are PNG, PDF or JSON
- Integration engineers encoding credentials or payloads with the URL-safe alphabet for query strings
- Automation builders decoding Base64 attachment fields inside a no-code workflow
- Security analysts decoding suspicious encoded strings from logs in bulk
- AI agent builders giving an agent an exact encode and decode step it cannot get wrong
Changelog
- 2026-11-01: Page text only: an Example section from a real run. Code, output and price are unchanged.