A device for separating a sample of cells suspended in a bio-compatible ferrofluid is described. The device includes a microfluidic channel having a sample inlet, at least one output, and a length between the sample inlet and the at least one output, wherein a sample can be added to the sample inlet and flow along the length to the at least one outlet. The device includes a plurality of electrodes, wherein the microfluidic channel length transverses the plurality of electrodes, and further includes a power source for applying a current to the plurality of electrodes to create a magnetic field pattern along the length of the microfluidic channel. The present invention also includes a method for separating at least one cell type. The method includes the steps of suspending cells in a bio-compatible ferrofluid to form a sample, passing the sample through a microfluidic channel that transverses a plurality of electrodes, applying a current to the plurality of electrodes to create a magnetic field pattern along th