Encoded-file API

Upload Base64 files and get a public URL

Send base64-encoded bytes in JSON and get a stable public CDN URL for webhooks, remote-file workflows, AI tools, and apps.

Get free API key 1 provisional / 15 verified uploads/mo · no credit card

How to upload Base64 data and get a public URL

Need to turn Base64 data into a public file URL? FilePost accepts encoded bytes in JSON, decodes them, stores the resulting file, and returns a stable CDN URL for the next system in your workflow.

Send data_base64, file_base64, or data with a content_type and filename. The dedicated endpoint is useful when a webhook, AI tool, or serverless function can produce JSON but cannot send multipart form data. This is a Base64-to-public-URL endpoint, not a URL-to-Base64 decoder; for a source that starts as an HTTP(S) URL and needs a stable hosted link, use the remote-file upload endpoint instead.

Upload base64-encoded bytes with FilePost

Use the authenticated FilePost upload API for base64-encoded bytes. The endpoint returns a JSON object containing the public URL, file ID, size, content type, and filename mode.

curl -X POST https://upload.filepost.dev/v1/upload/base64 \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filename":"invoice.pdf","content_type":"application/pdf","data_base64":"JVBERi0xLjQK..."}'

Example response

{
  "url": "https://cdn.filepost.dev/file/…",
  "file_id": "a1b2c3d4e5f6",
  "name": "invoice.pdf",
  "size": 84210,
  "content_type": "application/pdf"
}

What to do with the returned URL

Save the returned URL just like a multipart upload URL; the response includes the file ID, size, and content type.

POST /v1/upload/base64 → { "url": "https://cdn.filepost.dev/file/…" }

Good uses for base64 to URL

  • Webhook payloads containing encoded files
  • AI and serverless workflows that output JSON
  • Remote-file responses that need one stable file URL

Know the boundary

Base64 increases payload size and is less efficient than multipart for large files. Use the normal upload endpoint when your client can send multipart form data.

For the complete request and response contract, see the FilePost API documentation. You can also test the flow with the interactive upload on the homepage.

Base64 to URL FAQ

How do I upload a Base64 file and get a URL?

Use POST https://upload.filepost.dev/v1/upload/base64 with an application/json body. The data_base64, file_base64, and data fields are accepted aliases, and the response contains the public URL.

Does this convert a URL to Base64?

No. This page converts Base64 file data into a hosted public URL. If you start with a remote HTTP(S) file and want a stable public URL, use the remote file to URL endpoint instead.

Can I send a data URL instead of plain base64?

Yes. FilePost accepts a plain base64 string and data-URL-style input. Set the filename and content_type explicitly when your source does not provide them.

Is multipart better for large files?

Usually. Base64 inflates the payload and adds JSON overhead, so use the normal multipart upload endpoint when your client supports it.

Ready to turn base64 data into a file URL?

Start free, make one API request, and keep the returned CDN URL in your app or workflow.

Get free API key 1 provisional / 15 verified uploads/mo · no credit card