npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

jp-regions-i18n

v0.9.2

Published

Multilingual Japanese prefectures and cities data (i18n)

Readme

jp-regions-i18n

Zero-dependency multilingual Japanese prefectures and cities data.

47 prefectures and 1,917 municipalities across 10 languages: Japanese (kanji / hiragana / katakana / half-width kana), English, English with macrons, Simplified Chinese, Traditional Chinese, Korean, Portuguese, and Vietnamese.

日本語版はこちら | Full API Reference | ▶ Live Demo

Install

npm install jp-regions-i18n
# or
pnpm add jp-regions-i18n

Quick Start

Need only one language? Use a subpath import for a much smaller bundle (~17–30 KB gzip vs. 84 KB):

import { getPrefectures, getCities } from "jp-regions-i18n/en"; // English only (~17 KB gzip)
import { getPrefectures, getCities } from "jp-regions-i18n/ja"; // Japanese only (~30 KB gzip)
// also: /zh-CN  /zh-TW  /ko  /pt  /vi

The subpath API is identical except the lang argument is omitted (language is fixed) and AllLangs variants are not included.

To use all languages at once:

import { getPrefectures, getCities, getPrefecturesAllLangs, getPrefectureByName, getCitiesByPrefName } from "jp-regions-i18n";

// All prefectures in Japanese (default)
const prefs = getPrefectures();
// [{ code: "01", iso: "JP-01", lgCode: "010006", name: "北海道" }, ...]

// All prefectures in English
const prefsEn = getPrefectures("en");
// [{ code: "01", iso: "JP-01", lgCode: "010006", name: "Hokkaido" }, ...]

// Cities in Tokyo (code "13") in English
const cities = getCities("13", "en");
// [{ jisCode: "13101", name: "Chiyoda-ku", ... }, ...]

// Look up by name — no need to memorize prefecture codes
const tokyo = getPrefectureByName("Tokyo");          // or "東京都", "東京", "도쿄도", ...
const cities2 = getCitiesByPrefName("東京", "en");  // same result as getCities("13", "en")

// All prefectures with every language at once
const prefsAll = getPrefecturesAllLangs();
// [{ code: "01", ..., name: { ja: "北海道", en: "Hokkaido", ... } }, ...]

For the full API including lookup functions, filtering options, and type definitions, see docs/API.md.

Data

  • 47 prefectures
  • 1,917 municipalities: 779 cities, 20 designated cities, 171 wards, 23 special wards, 736 towns, 189 villages
  • Sources: JIS X 0401, JIS X 0402, ISO 3166-2:JP

License

MIT