Upload a file
  1. base64hub
  2. Text tools
  3. Base64 to CSV

Base64 to CSV: Decode and Save CSV Files

Paste a Base64-encoded CSV export, check the rows on screen and save it as a file. The bytes are kept exactly, so Excel and other tools read the file as the sender wrote it.

Free no sign-up, no limits Local nothing uploaded Updated Oct 27, 2026
Input 0 BOutput 0 BSize –

Processed in your browser. This page cannot send your data anywhere – how we know

How to decode Base64 to CSV

  1. Paste the Base64 into Input · Base64. A short sample is loaded when the page opens.
  2. Check the rows in Output · text. If the delimiter, quotes or accented letters look wrong, you know before opening the file anywhere else.
  3. If characters show as �, set Charset to the encoding of the export, often Windows-1252 for files from older Windows software.
  4. Press Download. When the decoded data looks like comma-separated rows, the status line reports CSV and the file is saved as decoded.csv. Short files and files separated by semicolons or tabs are reported as Text and saved as decoded.txt; rename those to .csv.

Download writes the decoded bytes unchanged, whatever charset you picked for the preview.

Example

The sample aWQsbmFtZSxlbWFpbAoxLEFkYSxhZGFAZXhhbXBsZS5jb20KMixMaW51cyxsaW51c0BleGFtcGxlLmNvbQo= decodes to:

id,name,email
1,Ada,ada@example.com
2,Linus,linus@example.com

Notice the start: aWQs is id,. CSV exports do not share a common prefix the way file formats do, but a few patterns help:

Base64 starts withMeaning
77u/UTF-8 byte order mark, typical of Excel’s “CSV UTF-8” export
//4UTF-16LE byte order mark, typical of “Unicode text” exports (tab-separated)
UEsDBZIP container: an XLSX workbook, not CSV
H4sIgzip-compressed data; decode with the gzip Base64 decoder

Where Base64 CSV files come from

Reporting and analytics APIs often return an export as a Base64 field inside a JSON response, because JSON cannot hold raw file bytes. Webhooks and message queues do the same for attachments, and automated emails carry CSV attachments as MIME Base64 parts; the email decoder extracts those from a raw message. Git hosting APIs return file contents as Base64 with line breaks, which this decoder skips.

If the JSON response holds several encoded fields, decode Base64 inside JSON finds them all at once.

Opening the decoded file in Excel

CSV has no header that declares its charset, so spreadsheet programs guess:

  • With a UTF-8 BOM (Base64 starting with 77u/), Excel reads accents and non-Latin scripts correctly when you double-click the file. 77u/aWQ7bmFtZTtjaXR5CjE7Wm/DqztLw7Zsbgo= is such a file, with Zoë and Köln intact.
  • Without a BOM, Excel on Windows uses the system’s legacy code page, and UTF-8 text turns into Zoë. Use Data > From Text/CSV and choose UTF-8 instead of double-clicking.
  • Semicolons instead of commas are normal in countries where the comma is the decimal separator. Excel opens such files correctly only when the system’s list separator is a semicolon; otherwise use the import dialog and set the delimiter.

Base64 to CSV in code

import base64, csv, io

s = "aWQsbmFtZSxlbWFpbAoxLEFkYSxhZGFAZXhhbXBsZS5jb20KMixMaW51cyxsaW51c0BleGFtcGxlLmNvbQo="
raw = base64.b64decode(s)

with open("export.csv", "wb") as f:
    f.write(raw)

rows = list(csv.reader(io.StringIO(raw.decode("utf-8-sig"))))
rows[1]   # ['1', 'Ada', 'ada@example.com']

utf-8-sig removes a BOM if there is one and is harmless otherwise. On the command line, base64 -d export.b64 > export.csv does the same as the Download button. See Base64 in Python for streaming large files.

FAQ

How do I convert Base64 to a CSV file?

Paste the Base64 above and press Download. If the tool recognizes the rows as CSV, the file is saved as decoded.csv; otherwise it is decoded.txt, which you can rename to .csv without changing its contents.

Why do accented characters look wrong when I open the CSV in Excel?

Excel on Windows assumes a legacy code page for CSV files without a byte order mark. Import the file through Data > From Text/CSV and choose UTF-8 (65001), or ask the sender for “CSV UTF-8”, which starts with a BOM.

My Base64 starts with UEsDB. Is that a CSV?

No, that is a ZIP container, which means an XLSX workbook or a zipped export. Use Base64 to Excel for spreadsheets or Base64 to ZIP for archives.

Is there a size limit?

No fixed limit. Decoding runs in your browser, so very large exports are bounded by the memory of your device; for multi-gigabyte files a command-line base64 -d is more practical.