How to encode an excel file to base64 for embedding in json api payloads
- Step 1Upload your Excel file — Drop the .xlsx. FileReader.readAsDataURL() encodes it to a Base64 data URI.
- Step 2Copy the Base64 string — The Base64 string (without the data URI prefix) is shown in the preview. Click Copy.
- Step 3Embed in your API request — Paste into your JSON body under the file key: { "attachment": "<base64-string>" }.
Frequently asked questions
Should I include the data URI prefix (data:application/...;base64,) in the API call?+
Most APIs expect just the raw Base64 string without the prefix. Check your API documentation — the tool shows both the prefixed and raw versions.
What MIME type should I use for .xlsx files?+
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet is the correct MIME type for .xlsx.
Is there a size limit for Base64 encoding in the browser?+
Free tier: 5 MB source file (≈6.7 MB Base64 output). Pro tier: 50 MB source file. Browser memory is the practical ceiling.
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.