Cell based biosensors are increasingly used as detection tools for tracing toxins in environmental samples. In such biosensors the reaction of cells cultivated in vitro is monitored upon exposing them to different samples. As the sample will be in close contact with living cells, controlling the sample properties, especially osmolarity, is necessary. Osmolarity difference across the cell membrane can lead to cell death upon exposure to the sample . Herein, we present a microfluidic cartridge designed to realize the adjustment of the sample osmolarity to any desired level without the need for an external osmometer. This cartridge is easy to fabricate, and can be simply integrated in a cell-based microfluidic system for regulating the osmolarity on-line.