Zero Dependencies
Pure JavaScript and JSON. No databases, no native binaries.
Accessing a comprehensive Japanese dictionary offline usually means parsing a massive 100MB+ JSON file.
kanji-data solves the memory problem with build-time data sharding and lazy evaluation.
Pure JavaScript and JSON. No databases, no native binaries.
Cold starts stay near-instant with a tiny memory footprint.
No API keys, no rate limits, no network latency.
Chunks stay cached in memory after the first read.
Clearly structured and ready in milliseconds.
const kanji = require('kanji-data');
// 1. Get core metadata instantly
const neko = kanji.get('猫');
console.log(neko.meanings); // ['cat']
console.log(neko.kun_readings); // ['ねこ']
console.log(neko.jlpt); // 3
// 2. Fetch vocabulary (lazily loads a ~1MB shard)
const nekoWords = kanji.getWords('猫');
console.log(nekoWords[0]);
// 3. Get entire JLPT lists
const n5 = kanji.getJlpt(5);
// 4. Get kanji by school grade
const grade1 = kanji.getGrade(1);Inspect the output shape in your browser. This demo uses a small sample set.
This web demo supports 水, 火, 猫, 食, and 電. The npm package supports 13,000+ characters offline.
Returns core metadata for a kanji character. Extremely fast because core metadata is kept small and loaded on init. Returns null if the character is not found.
Returns vocabulary entries that use the specified kanji. The first call for a character reads the ~1MB dictionary shard and caches it in memory. Returns an empty array when no words exist.
Returns kanji for JLPT levels 1–5. Invalid levels return an empty array.
Returns kanji taught in a Japanese school grade. Grades 1–6 are elementary (教育漢字). Grade 8 covers remaining Jōyō kanji. Grade 9 covers Jinmeiyō name kanji.
Code is MIT-licensed. Data via kanjiapi.dev, using EDICT and KANJIDIC — © EDRDG, used under their licence. MIT · kanjiapi.dev · EDRDG · licence