How to use the Webhook Base64 File Decoder tool
- Paste the JSON object into Webhook payload, or select Example to load a small text attachment.
- Select Decode and download to process the payload.
- Check the Result box for the decoded size, then select the Download link to save the file.
- Open the saved file with a suitable program to confirm the attachment is what the sender intended.
How files travel inside webhook JSON
A webhook is an HTTP POST with a JSON body, and JSON has no type for binary data. Services that deliver a document, image or email attachment with an event therefore Base64-encode the file and put the text in a field, usually next to the file name and a media type. Inbound email parsers, form builders, e-signature platforms and scanning services all use variations of this pattern.
When an integration misbehaves, a quick check is to take the payload from your request log and look at the actual file. This tool does that without a script.
Which fields the webhook Base64 file decoder reads
The payload must be a JSON object, and the fields are looked up at its top level only.
- File content: data is used if present, otherwise base64, otherwise content.
- File name: filename is used if present, otherwise name. With neither, the download is called webhook.bin.
- The Base64 may be standard or URL-safe, with or without padding, contain line breaks, or be a full data URL.
- Slashes, backslashes and control characters in the name are replaced with underscores, and names are cut to 240 characters.
- A contentType field is ignored. The download is always typed application/octet-stream, and your system picks a program from the file extension.
Worked example with message.txt
The Example payload contains the 5-byte text Hello under data. The Result box shows the size line, and the Download link saves a file named message.txt.
A name such as ../etc/report.pdf would be saved as .._etc_report.pdf. Replacing path separators stops a payload from suggesting a location outside your download folder.
{
"filename": "message.txt",
"data": "SGVsbG8="
}
Result: 5 bytes · application/octet-stream
Download: message.txtPayloads that need preparation
Real webhooks often nest attachments, for example in an attachments array or under an event object. Copy the single attachment object out of the payload and paste only that. If the provider uses other key names, such as file_name or body, rename them to filename and data in the pasted text.
Three messages cover most failures. Expected a Base64 string means none of the three content fields holds a string at the top level. Enter Base64 data means the field is an empty string. Enter valid Base64 means the text is damaged, often because a logging system truncated it.
Frequently asked questions
Does it detect the file type automatically?
No. The tool does not inspect the bytes. The file keeps the name from the payload, so the extension there decides how your system opens it. Without a name you get webhook.bin and can rename it once you know the type.
Can I decode several attachments at once?
No. One run produces one file from the top-level fields. For a payload with an attachments array, paste each attachment object separately and download them one by one.
What if my payload has both data and content?
The data field wins. The order of preference is data, then base64, then content, and the first one that is present is decoded even if another field also holds text.
Is it safe to open the downloaded file?
Treat it like any attachment from the sender. The tool only decodes and does not scan for malware. It does clean the file name, so path separators and control characters cannot appear in it.
Is the webhook payload sent to a server?
No. The JSON is parsed in your browser and the file is assembled in memory there. Payloads with customer documents or personal data are not transmitted by this page.
Why is the download called webhook.bin?
The payload has neither a filename nor a name field at the top level, so the default is used. Add a filename property to the pasted JSON, or rename the file after downloading.