Base64Doc

Encode Excel Spreadsheets to Base64

100% Browser Local · 0 File Uploads · 100MB+ Ready

Drop local .xlsx or .csv workbooks to generate clean Base64 or Data URI strings, verify gateway payload budgets, and export ready-to-run JavaScript, Python, or Go code.

Try 1-Click Synthetic Samples (Zero-Trademark):

Drop any file, paste Base64, or press Ctrl/Cmd+V with clipboard files or raw API JSON

Runs inside a local Web Worker. Network tab stays at 0 file POST requests.

0 chars
Encoded Base64, Gateway Budget & Code Snippets Appear Here

Drop any local file up to 100MB+ or type UTF-8 text on the left. No data leaves your browser.

Interactive Synthetic Showcase Gallery

Load real client-side verified payloads straight into the workbench above. Zero third-party trademarks.

Free · InstantCASE-1

Shipping API JSON -> 2 Auto-Named PDFs + 180 deg Label Fix

Input Payload
Raw Shipping API JSON (4.8 KB)
Verified Output
waybill_label.pdf (4x6 in, 180 deg -> 0 deg) + commercial_invoice.pdf (A4, 2 pages)
Real browser-decoded output preview (client-side only)
Free · InstantCASE-2

ERP Payload -> PK\x03\x04 Verified 3-Sheet Excel Preview

Input Payload
ERP Base64 Payload (122.8 KB)
Verified Output
Summary (128 rows x 11 cols), LineItems (48 rows), Tax (24 rows) -> .xlsx / .csv / .json
Real browser-decoded output preview (client-side only)
Free · InstantCASE-3

Broken Data URI + MIME Fix + White Transparent Logo

Input Payload
Broken data:image/jpeg;base64 + \/ + newlines (4.9 KB)
Verified Output
Auto-fixed to image/png (512x512 px) + Checkerboard reveals white emblem
Real browser-decoded output preview (client-side only)
Free · InstantCASE-4

Gzip + Base64 Unpack & Korean EUC-KR Mojibake Self-Heal

Input Payload
Gzipped Base64 (212 chars) + EUC-KR Receipt
Verified Output
Gunzipped JSON + EUC-KR Hangul receipt recovered from UTF-8 replacement chars
Real browser-decoded output preview (client-side only)
Free · InstantCASE-5

40-Page Contract Slimming + Gateway Green-Light Check

Input Payload
40-Page Synthetic Contract PDF (33.7 KB)
Verified Output
Extract Page 1 -> +33.3% Base64 fits comfortably under 4.5 MB Vercel limit
Real browser-decoded output preview (client-side only)

Accurate MIME Headers for .xlsx, .xls, and UTF-8 .csv Spreadsheets

Automatically distinguish modern OOXML workbooks, legacy BIFF8 spreadsheets, and plain CSV exports without guessing obscure MIME strings.

Read full technical details

Spreadsheet integrations routinely break because a developer hardcodes application/vnd.ms-excel onto a modern .xlsx archive or sends application/octet-stream for a plain CSV export. Downstream SaaS parsers use the Data URI or JSON contentType metadata to pick the right reader before touching disk.

When you drop a spreadsheet into Base64Doc, the detector verifies whether the file starts with 50 4B 03 04 plus spreadsheetml XML (assigning the full OpenXML sheet MIME), D0 CF 11 E0 (legacy .xls), or delimited UTF-8 text (text/csv).

Verbatim byte encoding ensures leading UTF-8 BOM bytes (EF BB BF) inside localized CSV files remain intact so recipient spreadsheets keep Korean, Japanese, or European diacritics intact.

Why Zipping Helps Huge CSVs but Barely Shrinks .xlsx Payloads

Understand when pre-compressing a spreadsheet rescues an API payload limit and when a workbook must move to direct binary upload.

Read full technical details

A 10 MB uncompressed CSV ledger encodes to ~13.3 MB in Base64, failing Vercel and AWS gateway caps outright. Because plain CSV text repeats dates, SKU prefixes, and currency strings, compressing it to .zip or .xlsx typically slashes raw size by 75% before Base64’s +33.33% expansion applies.

By contrast, .xlsx files are already ZIP archives containing Deflate-compressed XML sheets. Running Gzip again on an .xlsx yields under 2% savings while adding decompression complexity on the receiver. When an .xlsx already exceeds 3.35 MB raw, splitting worksheets or switching to pre-signed cloud upload is the cleanest engineering fix.

Zero-Exposure Financial Encoding & Integration Snippets

Keep payroll sheets, vendor quotes, and invoice ledgers inside local browser memory while exporting copy-ready API test payloads.

Read full technical details

Accounting teams and backend developers testing webhook importers cannot paste live revenue sheets into ad-laden web utilities that post files to remote servers. Everything here executes strictly inside your local Web Worker—verifiable offline after page load.

Once encoded, switch directly to the JSON Payload wrapper or copy verified Python, Node.js, C#, Go, or PowerShell blocks to replay the exact request against staging endpoints.

Step-by-Step Local Workflow

STEP 1

Select Local .xlsx, .xls, or .csv Workbook

Drop a spreadsheet file into the local workbench; Base64Doc inspects its magic bytes to assign the exact spreadsheetml, ms-excel, or text/csv MIME header.

STEP 2

Choose Raw Base64 or Data URI Wrapping

Keep raw single-line RFC 4648 output for ERP REST bodies, switch to RFC 2045 MIME-76 for email parts, or enable Data URI mode for self-contained HTML fixtures.

STEP 3

Review Gateway Size & Compression Notes

Verify whether the +33.33% Base64 expansion stays green beneath Vercel 4.5 MB or AWS 6 MB limits; for massive .csv exports, consider zipping before encoding.

STEP 4

Copy JSON Request Body or Code Template

Grab a wrapped JSON integration object or copy Python, JavaScript, C#, Go, or PowerShell code ready for your ETL or webhook test suite.

Technical Specification Summary

CapabilityBase64Doc BehaviorEngineering Notes
Modern XLSX MIMEapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheetApplied automatically when PK\x03\x04 contains spreadsheetml manifests.
Legacy XLS & CSV MIMEapplication/vnd.ms-excel | text/csvAssigned via D0 CF 11 E0 signature or UTF-8 delimiter heuristics.
Pre-Compression Behavior.xlsx already Deflate-zippedExtra Gzip saves < 2% on .xlsx, whereas raw .csv shrinks 70%–85% when zipped.
UTF-8 BOM HandlingVerbatim EF BB BF preservedFile bytes encode untouched so Excel desktop preserves non-ASCII CSV columns.
Security PostureZero-upload Web WorkerPayroll, ledger, and SKU margins never cross the public internet.

Frequently Asked Questions

Which MIME type should accompany an encoded .xlsx spreadsheet in a Data URI?

Assign the official IANA MIME type application/vnd.openxmlformats-officedocument.spreadsheetml.sheet for .xlsx, application/vnd.ms-excel for legacy D0 CF 11 E0 .xls, and text/csv for CSV. Base64Doc detects the file signature and populates the matching prefix automatically.

Are financial columns in my spreadsheet ever transmitted over the network?

No, all byte reading and Base64 chunking run strictly inside local browser memory and a Web Worker. Zero file bytes are sent to any server.

Should I Gzip an .xlsx workbook before Base64 encoding to stay below 4.5 MB?

No, .xlsx files already use ZIP Deflate compression internally so Gzip saves under 2%. Only raw .csv files compress dramatically (often 70%–85%) before Base64 encoding.

Does encoding a UTF-8 CSV preserve the EF BB BF byte order mark?

Yes, local file encoding converts the exact disk byte stream verbatim without stripping BOM headers or altering CRLF line endings.

Can I encode a 20 MB CSV export without crashing my browser tab?

Yes, aligned 786,432-byte Web Worker chunking handles large spreadsheets smoothly and displays a virtualized head/tail excerpt alongside one-click .txt export.

Explore All 34 Base64 Converters & Developer Tools