We study the effect of depolarization field related with inhomogeneous polarization distribution, strain and surface energy parameters on a domain wall profile near the surface of a ferroelectric film within the framework of Landau-Ginzburg-Devonshire phenomenology. Both inhomogeneous elastic stress and positive surface energy lead to the wall broadening at electrically screened surface. For ferroelectrics with weak piezoelectric coupling, the extrapolation length that defines surface energy parameter, affects the wall broadening more strongly than inhomogeneous elastic stress. Unexpectedly, the domain wall profile follows a long-range power law when approaching the surface, while it saturates exponentially in the bulk.In materials with high piezoelectric coupling and negligibly small surface energy (i.e. high extrapolation length) inhomogeneous elastic stress effect dominates.