Base64 Encoder & Decoder — Text, Files, Images to Data URI
Pricing
from $1.00 / 1,000 text encoded or decodeds
Base64 Encoder & Decoder — Text, Files, Images to Data URI
Base64 encode and decode text, files, image links and key-value store records: Base64, base64url and data URIs with the MIME type found from the bytes, size and SHA-256. Decode Base64 or data URIs back to text or a file with a link. Export to JSON, CSV or Excel, or via API.
Pricing
from $1.00 / 1,000 text encoded or decodeds
Rating
0.0
(0)
Developer
Steady Scrape
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Features
Share
Base64 Encoder & Decoder turns texts, files, image links and key-value store records into Base64, base64url and ready data URIs, with the MIME type found from the file's own bytes, its size and its SHA-256 — and decodes Base64, base64url or data URIs back to text or to a file with a download link. One dataset row per item, so it fits an API call, an n8n, Make or Zapier step, or an AI agent's tool. Invalid input is a free row that says what is wrong. Export to JSON, CSV or Excel, or call it via API.
What this Base64 encoder and decoder does
- Encode text to Base64 as UTF-8 (emoji and accents included). A JSON, HTML or SVG text gets its own type in the
data URI (
data:image/svg+xml;base64,…is ready for CSS). - Encode files and images to Base64 from links: images, PDFs, Office documents, audio, video, fonts, archives. Google Drive, Dropbox and GitHub share links are read as the file they share. Upload files in the form, or pick a key-value store and encode its records (screenshots, downloads, exports from other Actors).
- MIME type from the bytes: PNG, JPEG, GIF, WebP, AVIF, HEIC, SVG, PDF, DOCX, XLSX, PPTX, OpenDocument, EPUB, ZIP,
MP3, MP4, WebM, WOFF2 and more are recognised by their signature, so a file served as
application/octet-streamstill getsdata:image/png;base64,…. The row says where the type came from (bytes,content-type,file-name). - Three outputs: standard Base64 (RFC 4648, padded), base64url (URL-safe, no padding: JWTs, URLs, file names) and data URI. Optional MIME line wrapping at 76 characters (email, RFC 2045) or 64 (PEM).
- Decode Base64 to text or to a file: standard or URL-safe, padded or not, line breaks ignored; data URIs
(Base64 or percent-encoded, with their charset and
name=); PEM blocks. Auto mode gives text for text and a file for images, PDFs and other binaries; decoded files are saved with a link that opens without a login. - Size and SHA-256 of every file and text, to check integrity or deduplicate.
- Large outputs are never cut: when a row would pass the dataset's 9 MB limit, each output is saved whole in the run's key-value store and linked from the row.
- Invalid input is free: a value that is not Base64 says which character is wrong and where; a dead link, a private address or an empty file is a row with its reason, and the run goes on.
Use cases
- Image to Base64 for LLM vision APIs (OpenAI, Claude, Gemini): give image links, get data URIs to paste into a request.
- Embed images and fonts in HTML, CSS and emails: data URIs for inline images, icons, SVG backgrounds and fonts; MIME-wrapped Base64 for email attachments.
- File to Base64 for APIs that take attachments as Base64 strings (email senders, e-signature, document and OCR APIs, webhooks).
- Decode Base64 attachments received from an API or a webhook back to a PDF, an image or a text, with a link.
- Automation steps: an n8n, Make or Zapier flow, or an MCP agent, that needs Base64 in or out without code.
- Chain other Actors: encode the screenshots, images or downloads another Actor left in a key-value store.
How to encode or decode Base64
- To encode, write a Text, add File or image links, upload files, or pick a key-value store.
- To decode, paste a Base64 value or data URI (or many). Choose Decode to: Auto, text, or a file.
- Choose the Encoded output (Base64, base64url, data URI) and, for email, a line length of 76.
- Run it. Each item is a dataset row; decoded files and large outputs have their links in the row.
Input example
{"text": "Hello, World! 👋","fileUrls": ["https://www.w3.org/Icons/w3c_home.png"],"base64Inputs": ["SGVsbG8sIFdvcmxkIQ==", "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="],"outputFormats": ["base64", "dataUri"],"decodeTo": "auto"}
Output: Base64, data URI, decoded text or file link
An encoded image:
{"item": 2,"operation": "encode","inputType": "link","input": "https://www.w3.org/Icons/w3c_home.png","status": "ok","fileName": "w3c-72x48.png","mimeType": "image/png","mimeTypeFrom": "bytes","extension": "png","sizeBytes": 1848,"sha256": "590608bf256237f22d84bbab2a0a1afc0d4f20db6350bbac2c6841f1f3e13b01","base64": "iVBORw0KGgoAAAANSUhEUgAAAEgAAAAw…","dataUri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAAw…","base64Length": 2464}
A decoded text, and a decoded file:
{ "item": 4, "operation": "decode", "inputType": "base64", "status": "ok", "text": "Hello, World!", "mimeType": "text/plain", "sizeBytes": 13 }{ "item": 5, "operation": "decode", "inputType": "dataUri", "status": "ok", "mimeType": "image/png", "sizeBytes": 70, "fileKey": "decoded-005.png", "fileUrl": "https://api.apify.com/v2/key-value-stores/…/records/decoded-005.png?signature=…" }
A value that is not Base64 (free):
{ "item": 6, "operation": "decode", "status": "invalid", "reason": "the character \"!\" at position 8 is not Base64 (A–Z, a–z, 0–9, + and /, or - and _ for base64url, = only at the end)" }
Fields
| Field | What it holds |
|---|---|
item | The item's place in the run: texts, then links, store records, values to decode |
operation | encode or decode |
inputType | text, link, record, base64 or dataUri |
input | The text, the link (tokens masked), the record, or the start of the value decoded |
status / reason | ok, or invalid, unreadable, too_large with the reason (free rows) |
fileName, mimeType, mimeTypeFrom, extension | The file's name and type, and where the type came from |
sizeBytes, sha256 | Size and SHA-256 of the raw bytes |
base64, base64url, dataUri | The encodings asked for |
base64Length | Length of the padded Base64, also when it is in the store |
text | The decoded text |
fileKey, fileUrl | A decoded file (or a long decoded text) in the run's key-value store, with a link that opens for anyone |
outputLinks | Encodings too large for a row, each saved whole as a text record with its link |
outputBytes, extraOutputUnits | Bytes of output, and the started 10 MB past the first 20 MB that were charged |
The run's SUMMARY record counts what was encoded and decoded and lists every problem.
Pricing
Pay per event, nothing else: US$0.001 per text encoded or decoded, US$0.002 per file (a link, an upload or a store record encoded, or a Base64 value decoded to a file). Each includes the first 20 MB of output; a very large file adds US$0.001 per further started 10 MB of output (a 7.5 MB file with Base64 and data URI never does, a 25 MB one adds US$0.005). Invalid values, dead links, empty files and anything not converted are free. A run stops cleanly at your spending limit, before an item it could not pay for.
Limits
- Files up to 200 MB each (25 MB by default, set Most megabytes per file).
- A dataset row holds at most 8 MB of outputs; above that, the outputs are linked from the row (set Most megabytes in a dataset row lower to always get links, 0 for links only).
- Links must be public: a private address, a sign-in page or a link that needs a login is a free row with its reason. Video and music platforms' pages are pages, not files: link to a file itself.
- Up to 1,000 records from one key-value store per run when no record is named.
Is it legal?
It converts what you give it and reads only the links you name, as one download each, like a browser would. Encode only files you have the right to use. No site is scraped and no personal data is collected.
This Actor is not affiliated with, endorsed by or sponsored by any service named on this page (Google Drive, Dropbox, GitHub, W3C, OpenAI, Anthropic, Google Gemini, n8n, Make or Zapier); their names only say where a file or a result can come from or go.