Size-based particle sorting using a subwavelength optical fiber was demonstrated with 600-nm and 1-μm sizes of polystyrene particles. Optical forces acting on the particles were calculated based on three-dimensional finite-difference time-domain simulations at wavelengths of 808, 1047, and 1310 nm propagating in a subwavelength optical fiber with diameter of 800 nm. Calculations indicate that by launching two counterpropagating laser beams at different wavelengths into the fiber, the directions of the resultant optical scattering forces acting on the two particle sizes can be opposite along the fiber, which leads to a countertransport of the particles. To verify the theoretical prediction, experiments were performed using the 800-nm fiber to sort the two particle sizes. The results show that with two counterpropagating beams at 808 and 1310 nm, a continuous particle sorting was achieved. Measured particle velocities were in agreement with the theoretical calculations.