Decode base64 (or a full API response) into a real file, or encode a file to base64.
https://smartitools.com/api/base64-decode and get the raw file bytes back with the right
Content-Type — stateless, nothing is stored.
curl -X POST https://smartitools.com/api/base64-decode \
-H "Content-Type: application/json" \
-d '{"base64":"...","contentType":"application/pdf","filename":"file.pdf"}' \
-o file.pdf
Need an actual shareable link instead?
POST the same body to /api/temp-upload and you'll get back a URL that serves the file directly (GET,
no auth) for 24 hours, then it's automatically deleted.
curl -X POST https://smartitools.com/api/temp-upload \
-H "Content-Type: application/json" \
-d '{"base64":"...","contentType":"application/pdf","filename":"file.pdf"}'
# → {"url":"https://smartitools.com/api/temp-file?id=...","expiresAt":"..."}
PDF and common image formats (PNG, JPG, GIF) get a live preview automatically. Any other file type still decodes correctly and offers a direct download — the tool detects it from the file's own header bytes if no content type is given.
Yes. Paste JSON containing a fileBase64, base64 or data key (and optionally contentType and filename) and the tool extracts and decodes it automatically — no need to strip the JSON wrapper yourself.
The Decode and Encode tabs, and the "Download" button, run entirely in your browser — nothing is uploaded. The decode API does receive whatever you POST to it, since that's a server request by definition, but it doesn't store anything; it decodes and returns the bytes in the same request. The one exception is "Get shareable link", which does briefly store the file server-side — see the next question.
Clicking "Get shareable link" uploads the decoded file to SmartiTools, which returns a URL that serves it back to anyone who has the link — no login required, so treat the link like the file itself. It self-deletes: every time that link (or any other temp link) is requested, expired files older than 24 hours are swept and removed automatically, so nothing accumulates on the server.
A data URI embeds a file directly in a string, formatted as data:<content-type>;base64,<data> — used to inline images in HTML/CSS without a separate file request. This tool recognizes and strips that prefix automatically.
Yes — POST JSON to https://smartitools.com/api/base64-decode with a base64 (or fileBase64/data) field, plus optional contentType and filename, and it streams back the raw decoded file with the right Content-Type. It's stateless: nothing is saved server-side.