EEG file formats, and how to open each one

EDF, BDF, VHDR, SET, FIF: EEG has many formats because each amplifier vendor and toolbox defined its own. Here is what each one is and what reads it.

Updated

An EEG file has to store the samples, the sampling rate, channel names and units, and the events that mark when something happened. Formats differ in resolution (16 or 24 bit), in how events and annotations are kept, and in whether everything lives in one file or several.

BCILattice imports all of the formats below directly, and reads the sampling rate and channel layout from the file rather than assuming them.

The formats

FormatExtensionOrigin and notes
EDF / EDF+.edfEuropean Data Format, a widely supported open standard. 16-bit. EDF+ adds annotations and discontinuous recordings.
BDF.bdfBioSemi's 24-bit variant of EDF. Common in research systems and OpenBCI exports.
GDF.gdfGeneral Data Format, designed for biosignals with richer event tables. Used by the BCI Competition datasets.
FIF.fifThe Neuromag/Elekta format and MNE-Python's native format.
BrainVision.vhdr + .vmrk + .eegBrain Products: a text header, a marker file and a binary data file. Keep all three together.
EEGLAB.set (+ .fdt)EEGLAB's dataset format; data can be inside the .set or in a separate .fdt.
Neuroscan.cntContinuous data from Neuroscan systems.
SNIRF.snirfThe community standard for fNIRS, HDF5-based.
Tabular.csv, .txt, .xlsxPlain samples × channels tables from many consumer and custom devices; you confirm the label columns on import.

How to open an EDF (or any of these) file

In BCILattice, use Data Manager: pick a file, or a folder for multi-subject data, choose the modality (EEG, fNIRS, EMG or EOG), confirm label columns for tabular files, and review the quality warnings before anything is added to the study. The original file is never modified, and every later step writes its own stage.

In Python, MNE-Python reads all of these (mne.io.read_raw_edf, read_raw_bdf, read_raw_brainvision, read_raw_eeglab and so on).

BIDS: a layout, not a format

The Brain Imaging Data Structure (BIDS) standardises how a dataset is organised: folder names, sidecar JSON metadata and events.tsv files, with the recordings themselves in formats such as EDF, BDF, BrainVision or SET. Public repositories such as OpenNeuro use it. When BCILattice binds stimuli to a recording, a BIDS events.tsv needs no column mapping, because its column names are the standard's own, and paradigms export to BIDS events on every plan.

Questions

How do I open an EDF file?

Use EEG software that reads EDF, such as BCILattice (import it in Data Manager), EEGLAB, or MNE-Python with mne.io.read_raw_edf. EDF is an open standard, so most EEG tools can open it.

What is the difference between EDF and BDF?

EDF stores samples as 16-bit integers and BDF as 24-bit, giving BDF much finer amplitude resolution. BDF was introduced by BioSemi and otherwise follows the EDF structure.

What files does a BrainVision recording need?

Three files with matching names: the .vhdr header, the .vmrk marker file and the .eeg data file. Opening the .vhdr reads the other two, so keep them in the same folder.

Can I import EEG from a CSV file?

Yes. BCILattice imports CSV, TXT and XLSX tables of samples by channels, and asks you to confirm which columns are labels rather than guessing.

Read the reference

Related

Run a study end to end, on your own machine

The free plan covers two studies, the full analysis suite, and 118 of the 119 ML blocks.