Nanostructured fiber devices enabling mode conversion between arbitrary fiber modes are proposed and numerically validated. The intra-fiber nanostructures are optimized by the inverse design algorithm. We demonstrate a set of designs of nanophotonic fibers that can facilitate high-purity conversion from the fundamental mode to higher-order modes up to 3 orders for both LP and OAM modes inside the fibers. The purity values of the output modes can reach 98% with an ultra-wide operation band exceeding 400 nm around the telecom wavelengths. These devices can be fabricated by technique of thermal drawing of assembled preforms, making them suitable for mass production.