How to convert excel file to base64 for email api attachment encoding
- Step 1Upload the Excel file to attach — Drop the .xlsx report or export you want to send as an email attachment.
- Step 2Copy the Base64 string and MIME type — The Base64 string and MIME type are shown separately. Copy the string for the 'content' field.
- Step 3Add to your email API request — Paste into your attachments array: { content: '<base64>', type: '<mime>', filename: 'report.xlsx' }.
Frequently asked questions
What MIME type should I use for .xlsx attachments?+
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet — the correct MIME type for .xlsx files in any email API.
Does SendGrid accept Base64-encoded attachments in the v3 API?+
Yes. SendGrid's v3 Mail Send endpoint requires attachments in the 'content' field as Base64-encoded strings.
Is there a size limit for email attachments via API?+
SendGrid limits attachments to 30 MB total per email; Postmark to 10 MB. Ensure your .xlsx file is within these limits before encoding.
Privacy first
Every JAD Excel tool runs entirely in your browser using SheetJS and ExcelJS. Your spreadsheets, formulas, and data never leave your device — verified by zero outbound network requests during processing.