Photodissociation of 14N2 and 14N15N occurs in interstellar clouds, circumstellar envelopes, protoplanetary discs, and other environments due to UV radiation from stellar sources and the presence of cosmic rays. This source of N atoms initiates the formation of complex N-bearing species and influences their isotopic composition. To study the photodissociation rates of 14N15N by UV continuum radiation and both isotopologues in a field of cosmic ray induced photons. To determine the effect of these on the isotopic composition of more complex molecules. High-resolution photodissociation cross sections of N2 are used from an accurate and comprehensive quantum- mechanical model of the molecule based on laboratory experiments. A similarly high-resolution spectrum of H2 emission following interactions with cosmic rays has been constructed. The spectroscopic data are used to calculate dissociation rates which are input into isotopically differentiated chemical models, describing an interstellar cloud and a protoplanetary disc. The dissociation rate of 14N15N in a Draine field assuming 30K excitation is 1.73x10-10s-1 and the rate due to cosmic rays assuming an H2 ionisation rate of 10-16s-1 is about 10-15s-1, with up to a factor of 10 difference between isotopologues. Shielding functions for 14N15N by 14N2, H2, and H are presented. Incorporating these into an interstellar cloud model, an enhancement of the atomic 15N/14N ratio is obtained due to the self-shielding of external radiation at an extinction of about 1.5 mag. This effect is larger where grain growth has reduced the opacity of dust to ultraviolet radiation. The transfer of photolytic isotopic fractionation N2 to other molecules is significant in a disc model, and is species dependent with 15N enhancement approaching a factor of 10 for HCN.