Katakana is one of two syllabaries, called kana, used for writing Japanese, along with Hiragana. Until the 8th century, Japanese was written using Chinese characters, called kanji, on which the shapes of the katakana symbols are based. Modern Japanese texts are commonly written in a mixture of kanji, hiragana and katakana. Katakana is typically used for writing loanwords, onomatopoeic and mimetic words, exclamations, and some specialized scientific terminology. It can also be used to imply a conversational tone, to give emphasis to particular words, or to signal irony or a euphemism. Both hiragana and katakana can be written in small type alongside or above kanji words to indicate the pronunciation or meaning of the kanji.
Katakana is a complete orthography; in principle any spoken Japanese word can be written using the script, although in practice this is rarely done. There are 102 syllables in spoken Japanese, but not all are represented by their own distinct symbol in Katakana writing. There are 48 written symbols, also called kana, each representing one mora, essentially a short syllable. Syllables with long vowels count as two morae and are represented in writing by two kana. There are 5 kana for writing independent vowels, 1 for writing the syllabic nasal /n/, and 42 for writing various CV syllables. To enable all 102 spoken syllables to be written using only these 48 symbols, diacritics are used. Dakuten and nigoriten can be added to a character to mark voicing, where it is distinctive, and a small circle maru is written to the upper right of the symbols ha, hi, hu, he, and ho, to represent pa, pi, pu, pe, and po. There are no symbols for writing palatalized sounds; instead the y syllables are used in conjunction with ki, si, ni, hi, mi and ri. So the sound [nja/ña] is written ni+ya.
Katakana characters are traditionally arranged in the order in which they appear in a short poem called the iroha, in which each character occurs only once. However, modern dictionaries use the "fifty-sound order" based on that of the Indic script; vowels are ordered first, then consonants, according to their place and manner of articulation.
Latin question mark, exclamation mark and hyphen are used, along with Japanese (used with both kanji and kana) full stop, comma and quotation marks.
The Japanese language is traditionally written in vertical columns from right to left, but texts are increasingly being written horizontally from left to right also. Spacing is not used between words.