Tutorials

How to convert EDF to CSV

Three ways, and what each CSV holds.

4 min readUpdated December 2026

Before you convert

A CSV file is plain text with one row per sample and one column per channel, so Excel, R and pandas can read it. It is several times larger than the EDF it comes from, because every value is written out in digits: the 5-minute sample file, 3.1 MB as EDF, makes a CSV of 16 MB. Excel stops at 1,048,576 rows, about 68 minutes at 256 Hz.

A CSV has no standard place for the rest of the EDF header: calibration, the start of the recording and the annotations. A table with one column per channel cannot hold channels recorded at different rates either, unless they are resampled. Keep the EDF, and save the annotations in a file of their own.

One page in your browser

  1. Open the file in the Online EEG Reviewer. Choose the channels on the Recording page, and the montage and filters on the toolbar: the CSV holds the signal as it is drawn.

    Online EEG Reviewer: the toolbar over the sample recording
  2. Set Window to the length you need, up to 5 minutes, and page to where it starts.

  3. Choose Export › CSV of this page (displayed signal).

The first column, time_s, is the time in seconds from the start of the recording, and each channel follows with its unit in the heading, µV for EEG. When the rows have different sample rates, the file is long instead, one line per value with the columns row, time_s, value and unit. A gap in an EDF+D file has no lines. For the annotations, Annotations › Keep your annotations › events.tsv gives a table of onsets, durations and texts. Export is part of Pro and Max.

The whole recording in the app

In EEG TraceLab on iPhone, iPad and Mac, Recording Files on the recording’s page exports Selected Channels CSV (Channels as CSV on iPhone): the whole recording, the selected channels, every sample as recorded, without montage or filters. It is a long CSV with the columns channel_id, channel, sample_index, recording_sample_index, time_seconds, value and unit, after a few lines starting with # that describe the export. In the Viewer, Displayed Window CSV (This Window as CSV on iPhone) saves the window on screen as drawn. Both are part of Pro and Max.

Download on the App StoreDownload on the Mac App Store

In Python

import mne

raw = mne.io.read_raw_edf("recording.edf", preload=True)  # read_raw_bdf for BDF
df = raw.to_data_frame()  # time in seconds, then one column per channel in µV
df.to_csv("recording.csv", index=False, float_format="%.6f")
raw.annotations.to_data_frame(time_format=None).to_csv("annotations.csv", index=False)
  • MNE-Python reads every channel of an EDF file as EEG.
  • to_data_frame(picks=["O1", "O2"]) keeps only the channels you name, and raw.crop(tmin=60, tmax=120) keeps one stretch, in seconds.
  • annotations.csv has the onset and duration of each annotation in seconds, and its text.

Common problems

Excel puts everything in one column

In regions where Excel uses a comma for decimals, it expects semicolons between columns. Open the file with Data › From Text/CSV and choose Comma as the delimiter.

The values are a million times too small

They are in volts. MNE-Python’s raw.get_data() returns volts, while to_data_frame() and the Online EEG Reviewer write µV.

The file is too large to open

Export fewer channels or a shorter stretch, or keep the EDF and read it directly: see How to read EDF files in Python and MATLAB.