We develop the theoretical framework needed to study the distribution of hadrons with general polarization inside jets, with and without transverse momentum measured with respect to the standard jet axis. The key development in this paper, referred to as "polarized jet fragmentation functions", opens up new opportunities to study both collinear and transverse momentum dependent (TMD) fragmentation functions. As two examples of the developed framework, we study longitudinally polarized collinear Λ and transversely polarized TMD Λ production inside jets in both pp and ep collisions. We find that both observables have high potential in constraining spin-dependent fragmentation functions with sizeable asymmetries predicted, in particular, at the future Electron-Ion Collider.