It is very important to distinguish the different descriptions. Dirac notation is the representation independent description of quantum theory in terms of an abstract (rigged) Hilbert space. The vectors ##|\psi \rangle## are abstract objects which come to life just from the definition of their properties through the axioms declaring what a Hilbert space is. The same holds for linear self-adjoint operators like ##\hat{p}## and ##\hat{x}##, which are defined in an abstract way by their commutator relations (Lie algebra of the translation group in 1 dimension, the socalled Heisenberg algebra,
$$[x,p]=\mathrm{i} \hbar \hat{1}.$$
It turns out from this algebra alone that both ##\hat{x}## and ##\hat{p}## have entire ##\mathbb{R}## as their spectrum, i.e., only continuous "generalized eigenvalues".
Now you can work in a specific representation by choosing an arbitrary complete set of (generalized) eigenvectors of an observable like the position. It's not a true Hilbert-space vector but a distribution, living in the dual space of the dense subspace of the Hilbert space, where the position and momentum operators are defined. It's "normalized to a ##\delta## distribution":
$$\langle x'|x \rangle=\delta(x-x').$$
The true normalizable Hilbertspace vectors are mapped to square-Lebesgue-integrable functions (vulgo "the wave function"),
$$\psi(x)=\langle x|\psi \rangle.$$
The Heisenberg algebra in position representation is given by
$$\tilde{x} \psi(x):=\langle x|\hat{x} \psi \rangle=\langle \hat{x} x|\psi \rangle=x \langle x|\psi=x \psi(x)$$
and
$$\tilde{p} \psi(x)=-\mathrm{i} \hbar \partial_x \psi(x).$$
Now you can look for the generalized momentum eigenfunctions in position representation, leading to
$$\tilde{p} u_p(x)=p u_p(x) \; \Rightarrow \; u_p(x)=N_p \exp(\mathrm{i} p x/\hbar).$$
Again, that's a distribution, normalizable to a ##\delta## distribution. Using the completeness relation for the generalized position eigenstates,
$$\int_{\mathbb{R}} \mathrm{d} x |x \rangle \langle x|=\hat{1},$$
you get
$$\langle p|p' \rangle=\int_{\mathbb{R}} \mathrm{d} x \langle p| x\rangle \langle x|p' \rangle=\int_{\mathbb{R}} \mathrm{d} x u_p^*(x) u_{p'}(x) = \int_{\mathbb{R}} \mathrm{d} x N_{p}^* N_{p'} \exp[\mathrm{i} x(p'-p)/\hbar]=|N_p|^2 2 \pi \hbar \delta(p-p'),$$
as is well-known from the maths of the Fourier transformation. Thus up to an irrelevant phase factor we have found the properly normalized generalized momentum eigenvector in position representation to be
$$u_p(x)=\frac{1}{\sqrt{2 \pi \hbar}} \exp(\mathrm{i} p x/\hbar).$$
Now you can also work in momentum representation. The corresponding wave function is
$$\tilde{\psi}(p)=\langle p|\psi \rangle=\int_{\mathbb{R}} \mathrm{d} x \langle p | x \rangle \langle x | \psi \rangle=\int_{\mathbb{R}} \mathrm{d} x u_{p}^*(x) \psi(x)= \int_{\mathbb{R}} \mathrm{d} x \frac{1}{\sqrt{2 \pi \hbar}} \exp(-i p x/\hbar) \psi(x).$$
In the same way you find the inverse relation,
$$\psi(x)=\langle x|\psi \rangle=\int_{\mathbb{R}} \mathrm{d} p \langle x|p \rangle \langle p|\psi \rangle=\int_{\mathbb{R}} \mathrm{d} p u_p(x) \tilde{\psi}(p)= \int_{\mathbb{R}} \mathrm{d} p \frac{1}{\sqrt{2 \pi \hbar}} \exp(\mathrm{i} p x/\hbar) \tilde{\psi}(p),$$
as also expected from the maths of Fourier transformations.