ん, in hiragana or ン in katakana, is one of the Japanese kana, which each represent one mora. ん is the only kana that does not end in a vowel sound (although in certain cases the vowel ending of kana, such as す, is unpronounced). The kana for mu, む/ム, was originally used for the n sound as well, while ん was originally a hentaigana used for both n and mu. In the 1900 Japanese script reforms, hentaigana were officially declared obsolete and ん was officially declared a kana to represent the n sound.
In addition to being the only kana not ending with a vowel sound, it is also the only kana that does not begin any words in standard Japanese (other than foreign loan words such as "Ngorongoro", which is transcribed as ンゴロンゴロ) (see Shiritori). Some regional dialects of Japanese feature words beginning with ん, as do the Ryukyuan languages (which are usually written in the Japanese writing system), in which words starting with ン are common, such as the Okinawan word for miso, nnsu (transcribed as ンース). In the Ainu language, ン is interchangeable with the small katakana ㇴ as a final n.
The kana is followed by an apostrophe in some systems of transliteration whenever it precedes a vowel or a y- kana, so as to prevent confusion with other kana. However, like every other kana besides yōon, it represents an entire mora, so its pronunciation is, in practice, as close to "nn" as "n". The pronunciation can also change depending on what sounds surround it. These are a few of the ways it can change:
[n] (before n, t, d, r, ts, z, ch and j )
[m] (before m, p and b )
[ŋ] (before k and g)
[ɴ] (at the end of utterances)
[ũ͍] (before vowels, palatal approximants (y), consonants h, f, s, sh and w)
[ĩ] (after the vowel i if another vowel, palatal approximant or consonant f, s, sh, h or w follows.)