We consider the edge-type Josephson junctions in thin films, for which the stray fields significantly affect the screening and tunneling currents. It is demonstrated that the spatial distribution of the phase difference φ across thin-film Josephson junctions is nonlocal. We find that in the limit of weak tunneling and short junctions the phase difference φ is a universal function. This function is proportional to the applied field H an depends only on the junction geometry. In the case of narrow thin strips we find this dependence analytically. Using this universal function we demonstrate that the maximum supercurrent across narrow junctions in thin films decays as 1/, that is much slower than 1/H for bulk junctions.