day, sun, Japan, counter for days
- On
- ニチ、ジツ
- Kun
- ひ、-び、-か
kanji.js is a small, open-source library that searches and looks up Japanese kanji characters in Node.js and in the browser.
$ npm install kanji.jsday, sun, Japan, counter for days
Kanji.getDetails('日')
The full KANJIDIC2 dictionary ships with the library. You get meanings, on and kun readings, stroke counts, school grades, JLPT levels and frequency ranks, with no network requests.
Rank characters by English meaning or by reading typed in romaji, and filter them by school grade or JLPT level, using exact values or ranges.
One UMD build that works in Node.js, bundlers and plain <script> tags. TypeScript types are included, and there is no setup step.
Import the class and call its methods directly. The dictionary is bundled, so results come back synchronously as plain objects.
Read the API referenceimport Kanji from 'kanji.js'Kanji.getDetails('気')// { literal: '気', meanings: ['spirit', 'mind', …], … }Kanji.search({ meaning: 'counter for days', grade: 1 })[0]// { literal: '日', onyomi: ['ニチ', 'ジツ'], … }Kanji.random()// a random entry from the dictionary