Suppose $(\mathcal{C},\mathbb{E},\mathfrak{s})$ is an $n$-exangulated category. We show that the idempotent completion and the weak idempotent completion of $\mathcal{C}$ are again $n$-exangulated categories. Furthermore, we also show that the canonical inclusion functor of $\mathcal{C}$ into its (resp. weak) idempotent completion is $n$-exangulated and $2$-universal among $n$-exangulated functors from $(\mathcal{C},\mathbb{E},\mathfrak{s})$ to (resp. weakly) idempotent complete $n$-exangulated categories. Furthermore, we prove that if $(\mathcal{C},\mathbb{E},\mathfrak{s})$ is $n$-exact, then so too is its (resp. weak) idempotent completion. We note that our methods of proof differ substantially from the extriangulated and $(n+2)$-angulated cases. However, our constructions recover the known structures in the established cases up to $n$-exangulated isomorphism of $n$-exangulated categories.
Comment: v4: 42 pages; Correction of typos; Changed statements concerning 2-universality; Added corollaries concerning idempotent completions of n-exact categories; Comments very welcome!