Reverse electrodialysis (RED) using nanofluidic ion-selective membrane may convert the salinity difference between seawater and river water into electricity. However, heterogeneous modification reactions of cellulose commonly leads to the inhomogeneous distribution of surface charges, thereby hampering the improvement of cellulose-based nanofluidic membranes for energy conversion. Herein, RED devices based on cellulose nanofibers (CNF) membranes with opposite charge characteristics were developed for the generation of salinity gradient power. Anion-CNF membrane (A-CNF) with varying negative charge densities was synthesized using 2,2,6,6-Tetramethylpiperidine 1-oxy radical (TEMPO) oxidation modification, whereas cation-CNF membrane (C-CNF) was prepared through etherification. By mixing artificial seawater and river water, the output power density of CNF RED device is up to 2.87 W m−2. The output voltage of 30 RED units connected in series may reach up to 3.11 V, which can be used to directly power tiny electronic devices viz. LED lamp, calculator, etc. The results of this work provide a feasible possibility for widespread application of ion exchange membranes for salinity gradient energy harvesting.