Polyimides are widely utilized engineering polymers due to their excellent balance of mechanical, dielectric, and thermal properties. However, the manufacturing of polyimides into complex multifunctional designs can be hindered by dimensional shrinkage of the polymer upon imidization and post processing methods and inability to tailor electronic or mechanical properties. In this work, we developed methods to three-dimensional (3D) direct ink write polyimide closed-cell stochastic foams with tunable densities. These polyimide structures preserve the geometrical fidelity of 3D design with a linear shrinkage value of <10% and displayed microscale porosity ranging from 25 to 35%. This unique balance of morphology and direct-write compatibility was enabled by polymer phase inversion behavior without the need of conventional post-print cross-linking, imidization, or poreinducing freeze processing. The manufacturability, thermal stability, and dielectric properties of the 3D polyimide stochastic foams reported here serve as enablers for the exploration of hierarchical, lightweight, high-temperature, high-power electronics.