Let $$\Pi =\{z=x+iy\in \mathbb {C}:\;y>0\} $$ be the upper half-plane and the interval [a, b] be a subset of $$ \partial \Pi =\mathbb {R}$$ . We derive a Carleman integral representation formula for all holomorphic functions $$f\in {\mathcal H}(\Pi )$$ that have angular boundary values on [a, b] and which belong to the class $$\mathcal { N H}^1_{[a,b]}(\Pi )$$ . The class $$\mathcal {NH}^1_{[a,b]}(\Pi )$$ is the class of holomorphic functions in $$\Pi $$ which belong to the Hardy class $${\mathcal H}^1$$ near the interval [a, b] (“The Class of Functions Representable by Carleman Integral Representation Formula” section). As an application of the above characterization, our main result is an extension theorem for a function $$f\in L^1([a,b])$$ to a function $$f\in \mathcal {NH}^1_{[c,d]}(\Pi )$$ , for almost all intervals $$[c,d]\subset (a,b)$$ . Similar results can be proved for a function f holomorphic in a slanted disc, with integrable boundary values on the horizontal part of the boundary.