Indonesia - Formatting standards & code snippets

Here is a complete list of standards and formats used in Indonesia. It includes a full list of ISO codes, number, date, currency, telephone and address formats. You will also get code examples on how to perform the most common formatting operations in Java, C#, JavaScript and PHP. Multiple resource files are made available, mainly the complete list of states, in different formats such as CSV, XML, JSON, HTML and SQL.

What are the ISO-3166-1 codes for Indonesia?

  • Alpha-2: ID
  • Alpha-3: IDN
  • Numeric: 360
  • Java Locale Code: id_ID
  • .Net CultureInfo Code: id-ID
  • PHP Locale Code: id_ID

What is the official language in Indonesia?

  • Indonesian

What is the date format in Indonesia?

The date format in Indonesia is little-endian:

  • Format: dd/MM/yyyy
    Ex: 03/12/2014 for December 3rd 2014
Formatting a date in Java:
Locale locale = new Locale("id", "ID");
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy", locale);
sdf.format(new Date());
Formatting a date in C#:
CultureInfo ci = CultureInfo.GetCultureInfo("id-ID");
DateTime.Now.ToString("dd/MM/yyyy", ci);
Formatting a date in JavaScript:
date = new Date();
date.toLocaleDateString('id-ID');
Formatting a date in PHP:
date("d/m/Y");

What is the time format in Indonesia?

The time format in Indonesia is 24-hour notation in most cases.

  • Format: HH:mm[:ss]
    Ex: 09:00 for 09:00AM, and 21:00 for 09:00PM
Formatting time in Java:
Locale locale = new Locale("id", "ID");
SimpleDateFormat sdf = new SimpleDateFormat("HH.mm.ss", locale);
sdf.format(new Date());
Formatting time in C#:
CultureInfo ci = CultureInfo.GetCultureInfo("id-ID");
DateTime.Now.ToString("HH.mm.ss", ci);
Formatting time in JavaScript:
let date = new Date();
date.toLocaleTimeString('id-ID', {hour12: false});
Formatting time in PHP:
date("H.i.s");

What is the numeric format in Indonesia?

  • Format: 999.999.999,99
    • Group Size: 3
    • Grouping Character: . (dot)
    • Decimal Character: , (comma)
Formatting numbers in Java:
Locale locale = new Locale("id", "ID");
NumberFormat numberFormat = NumberFormat.getNumberInstance(locale);
numberFormat.format(999999999.99d);
Formatting numbers in C#:
double d = 999999999.99d;
d.ToString("n", CultureInfo.GetCultureInfo("id-ID")));
Formatting numbers in JavaScript:
let number = 999999999.99;
number.toLocaleString('id-ID');
Formatting numbers in PHP:
$fmt = new NumberFormatter($locale = 'id_ID', NumberFormatter::DECIMAL);
$fmt->format(999999999.99);

What is the currency format in Indonesia?

  • Format: Rp1.000.000.00
    • Group Size: 3
    • Grouping Character: . (dot)
    • Decimal Character: Not supported
    • Currency Symbol: Rp
    • Currency Symbol Position: Before number
    • Currency Name: Indonesian Rupiah (IDR)
Formatting currency in Java:
Locale locale = new Locale("id", "ID");
NumberFormat numberFormat = NumberFormat.getCurrencyInstance(locale);
numberFormat.format(999999999d);
Formatting currency in C#:
double d = 999999999d;
d.ToString("c", CultureInfo.GetCultureInfo("id-ID")));
Formatting currency in JavaScript:
let number = 999999999;
number.toLocaleString('id-ID', {currency: 'IDR', style: 'currency'});
Formatting currency in PHP:
$fmt = new NumberFormatter($locale = 'id_ID', NumberFormatter::CURRENCY);
$fmt->format(999999999.99);

Download list of provinces for Indonesia in CSV, JSON, HTML, SQL and XML


List of provinces: HTML - Select Control

------------------------
 ISO_3166-2 code + name
------------------------
<select>
	<option value="ID-AC">Aceh</option>
	<option value="ID-BA">Bali</option>
	<option value="ID-BB">Kepulauan Bangka Belitung</option>
	<option value="ID-BT">Banten</option>
	<option value="ID-BE">Bengkulu</option>
	<option value="ID-GO">Gorontalo</option>
	<option value="ID-JA">Jambi</option>
	<option value="ID-JB">Jawa Barat</option>
	<option value="ID-JT">Jawa Tengah</option>
	<option value="ID-JI">Jawa Timur</option>
	<option value="ID-KB">Kalimantan Barat</option>
	<option value="ID-KS">Kalimantan Selatan</option>
	<option value="ID-KT">Kalimantan Tengah</option>
	<option value="ID-KI">Kalimantan Timur</option>
	<option value="ID-KU">Kalimantan Utara</option>
	<option value="ID-KR">Kepulauan Riau</option>
	<option value="ID-LA">Lampung</option>
	<option value="ID-MA">Maluku</option>
	<option value="ID-MU">Maluku Utara</option>
	<option value="ID-NB">Nusa Tenggara Barat</option>
	<option value="ID-NT">Nusa Tenggara Timur</option>
	<option value="ID-PA">Papua</option>
	<option value="ID-PB">Papua Barat</option>
	<option value="ID-RI">Riau</option>
	<option value="ID-SR">Sulawesi Barat</option>
	<option value="ID-SN">Sulawesi Selatan</option>
	<option value="ID-ST">Sulawesi Tengah</option>
	<option value="ID-SG">Sulawesi Tenggara</option>
	<option value="ID-SA">Sulawesi Utara</option>
	<option value="ID-SB">Sumatera Barat</option>
	<option value="ID-SS">Sumatera Selatan</option>
	<option value="ID-SU">Sumatera Utara</option>
	<option value="ID-JK">DKI Jakarta</option>
	<option value="ID-YO">DI Yogyakarta</option>
</select>

List of provinces: CSV

code,name
ID-AC,"Aceh"
ID-BA,"Bali"
ID-BB,"Kepulauan Bangka Belitung"
ID-BT,"Banten"
ID-BE,"Bengkulu"
ID-GO,"Gorontalo"
ID-JA,"Jambi"
ID-JB,"Jawa Barat"
ID-JT,"Jawa Tengah"
ID-JI,"Jawa Timur"
ID-KB,"Kalimantan Barat"
ID-KS,"Kalimantan Selatan"
ID-KT,"Kalimantan Tengah"
ID-KI,"Kalimantan Timur"
ID-KU,"Kalimantan Utara"
ID-KR,"Kepulauan Riau"
ID-LA,"Lampung"
ID-MA,"Maluku"
ID-MU,"Maluku Utara"
ID-NB,"Nusa Tenggara Barat"
ID-NT,"Nusa Tenggara Timur"
ID-PA,"Papua"
ID-PB,"Papua Barat"
ID-RI,"Riau"
ID-SR,"Sulawesi Barat"
ID-SN,"Sulawesi Selatan"
ID-ST,"Sulawesi Tengah"
ID-SG,"Sulawesi Tenggara"
ID-SA,"Sulawesi Utara"
ID-SB,"Sumatera Barat"
ID-SS,"Sumatera Selatan"
ID-SU,"Sumatera Utara"
ID-JK,"DKI Jakarta"
ID-YO,"DI Yogyakarta"

List of provinces: JSON

------------------------
 ISO-3166-2 code + Name
------------------------
[
	{code: "ID-AC", name: "Aceh"},
	{code: "ID-BA", name: "Bali"},
	{code: "ID-BB", name: "Kepulauan Bangka Belitung"},
	{code: "ID-BT", name: "Banten"},
	{code: "ID-BE", name: "Bengkulu"},
	{code: "ID-GO", name: "Gorontalo"},
	{code: "ID-JA", name: "Jambi"},
	{code: "ID-JB", name: "Jawa Barat"},
	{code: "ID-JT", name: "Jawa Tengah"},
	{code: "ID-JI", name: "Jawa Timur"},
	{code: "ID-KB", name: "Kalimantan Barat"},
	{code: "ID-KS", name: "Kalimantan Selatan"},
	{code: "ID-KT", name: "Kalimantan Tengah"},
	{code: "ID-KI", name: "Kalimantan Timur"},
	{code: "ID-KU", name: "Kalimantan Utara"},
	{code: "ID-KR", name: "Kepulauan Riau"},
	{code: "ID-LA", name: "Lampung"},
	{code: "ID-MA", name: "Maluku"},
	{code: "ID-MU", name: "Maluku Utara"},
	{code: "ID-NB", name: "Nusa Tenggara Barat"},
	{code: "ID-NT", name: "Nusa Tenggara Timur"},
	{code: "ID-PA", name: "Papua"},
	{code: "ID-PB", name: "Papua Barat"},
	{code: "ID-RI", name: "Riau"},
	{code: "ID-SR", name: "Sulawesi Barat"},
	{code: "ID-SN", name: "Sulawesi Selatan"},
	{code: "ID-ST", name: "Sulawesi Tengah"},
	{code: "ID-SG", name: "Sulawesi Tenggara"},
	{code: "ID-SA", name: "Sulawesi Utara"},
	{code: "ID-SB", name: "Sumatera Barat"},
	{code: "ID-SS", name: "Sumatera Selatan"},
	{code: "ID-SU", name: "Sumatera Utara"},
	{code: "ID-JK", name: "DKI Jakarta"},
	{code: "ID-YO", name: "DI Yogyakarta"}
]

List of provinces: SQL

-- -----------------------------------------------------
-- Table `province`
-- -----------------------------------------------------
DROP TABLE IF EXISTS province;

CREATE TABLE IF NOT EXISTS province (
  id INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  code VARCHAR(6) NOT NULL,
  name VARCHAR(50) NOT NULL,
  PRIMARY KEY (id),
  UNIQUE INDEX id_UNIQUE (id ASC),
  UNIQUE INDEX code_UNIQUE (code ASC)
) ENGINE = InnoDB;

INSERT INTO province (id, code, name) VALUES (null, 'ID-AC', 'Aceh');
INSERT INTO province (id, code, name) VALUES (null, 'ID-BA', 'Bali');
INSERT INTO province (id, code, name) VALUES (null, 'ID-BB', 'Kepulauan Bangka Belitung');
INSERT INTO province (id, code, name) VALUES (null, 'ID-BT', 'Banten');
INSERT INTO province (id, code, name) VALUES (null, 'ID-BE', 'Bengkulu');
INSERT INTO province (id, code, name) VALUES (null, 'ID-GO', 'Gorontalo');
INSERT INTO province (id, code, name) VALUES (null, 'ID-JA', 'Jambi');
INSERT INTO province (id, code, name) VALUES (null, 'ID-JB', 'Jawa Barat');
INSERT INTO province (id, code, name) VALUES (null, 'ID-JT', 'Jawa Tengah');
INSERT INTO province (id, code, name) VALUES (null, 'ID-JI', 'Jawa Timur');
INSERT INTO province (id, code, name) VALUES (null, 'ID-KB', 'Kalimantan Barat');
INSERT INTO province (id, code, name) VALUES (null, 'ID-KS', 'Kalimantan Selatan');
INSERT INTO province (id, code, name) VALUES (null, 'ID-KT', 'Kalimantan Tengah');
INSERT INTO province (id, code, name) VALUES (null, 'ID-KI', 'Kalimantan Timur');
INSERT INTO province (id, code, name) VALUES (null, 'ID-KU', 'Kalimantan Utara');
INSERT INTO province (id, code, name) VALUES (null, 'ID-KR', 'Kepulauan Riau');
INSERT INTO province (id, code, name) VALUES (null, 'ID-LA', 'Lampung');
INSERT INTO province (id, code, name) VALUES (null, 'ID-MA', 'Maluku');
INSERT INTO province (id, code, name) VALUES (null, 'ID-MU', 'Maluku Utara');
INSERT INTO province (id, code, name) VALUES (null, 'ID-NB', 'Nusa Tenggara Barat');
INSERT INTO province (id, code, name) VALUES (null, 'ID-NT', 'Nusa Tenggara Timur');
INSERT INTO province (id, code, name) VALUES (null, 'ID-PA', 'Papua');
INSERT INTO province (id, code, name) VALUES (null, 'ID-PB', 'Papua Barat');
INSERT INTO province (id, code, name) VALUES (null, 'ID-RI', 'Riau');
INSERT INTO province (id, code, name) VALUES (null, 'ID-SR', 'Sulawesi Barat');
INSERT INTO province (id, code, name) VALUES (null, 'ID-SN', 'Sulawesi Selatan');
INSERT INTO province (id, code, name) VALUES (null, 'ID-ST', 'Sulawesi Tengah');
INSERT INTO province (id, code, name) VALUES (null, 'ID-SG', 'Sulawesi Tenggara');
INSERT INTO province (id, code, name) VALUES (null, 'ID-SA', 'Sulawesi Utara');
INSERT INTO province (id, code, name) VALUES (null, 'ID-SB', 'Sumatera Barat');
INSERT INTO province (id, code, name) VALUES (null, 'ID-SS', 'Sumatera Selatan');
INSERT INTO province (id, code, name) VALUES (null, 'ID-SU', 'Sumatera Utara');
INSERT INTO province (id, code, name) VALUES (null, 'ID-JK', 'DKI Jakarta');
INSERT INTO province (id, code, name) VALUES (null, 'ID-YO', 'DI Yogyakarta');

List of provinces: XML

<!-- ISO-3166-2 code + name -->
<?xml version="1.0" encoding="UTF-8"?>
<provinces>
	<province>
		<code>ID-AC</code>
		<name>Aceh</name>
	</province>
	<province>
		<code>ID-BA</code>
		<name>Bali</name>
	</province>
	<province>
		<code>ID-BB</code>
		<name>Kepulauan Bangka Belitung</name>
	</province>
	<province>
		<code>ID-BT</code>
		<name>Banten</name>
	</province>
	<province>
		<code>ID-BE</code>
		<name>Bengkulu</name>
	</province>
	<province>
		<code>ID-GO</code>
		<name>Gorontalo</name>
	</province>
	<province>
		<code>ID-JA</code>
		<name>Jambi</name>
	</province>
	<province>
		<code>ID-JB</code>
		<name>Jawa Barat</name>
	</province>
	<province>
		<code>ID-JT</code>
		<name>Jawa Tengah</name>
	</province>
	<province>
		<code>ID-JI</code>
		<name>Jawa Timur</name>
	</province>
	<province>
		<code>ID-KB</code>
		<name>Kalimantan Barat</name>
	</province>
	<province>
		<code>ID-KS</code>
		<name>Kalimantan Selatan</name>
	</province>
	<province>
		<code>ID-KT</code>
		<name>Kalimantan Tengah</name>
	</province>
	<province>
		<code>ID-KI</code>
		<name>Kalimantan Timur</name>
	</province>
	<province>
		<code>ID-KU</code>
		<name>Kalimantan Utara</name>
	</province>
	<province>
		<code>ID-KR</code>
		<name>Kepulauan Riau</name>
	</province>
	<province>
		<code>ID-LA</code>
		<name>Lampung</name>
	</province>
	<province>
		<code>ID-MA</code>
		<name>Maluku</name>
	</province>
	<province>
		<code>ID-MU</code>
		<name>Maluku Utara</name>
	</province>
	<province>
		<code>ID-NB</code>
		<name>Nusa Tenggara Barat</name>
	</province>
	<province>
		<code>ID-NT</code>
		<name>Nusa Tenggara Timur</name>
	</province>
	<province>
		<code>ID-PA</code>
		<name>Papua</name>
	</province>
	<province>
		<code>ID-PB</code>
		<name>Papua Barat</name>
	</province>
	<province>
		<code>ID-RI</code>
		<name>Riau</name>
	</province>
	<province>
		<code>ID-SR</code>
		<name>Sulawesi Barat</name>
	</province>
	<province>
		<code>ID-SN</code>
		<name>Sulawesi Selatan</name>
	</province>
	<province>
		<code>ID-ST</code>
		<name>Sulawesi Tengah</name>
	</province>
	<province>
		<code>ID-SG</code>
		<name>Sulawesi Tenggara</name>
	</province>
	<province>
		<code>ID-SA</code>
		<name>Sulawesi Utara</name>
	</province>
	<province>
		<code>ID-SB</code>
		<name>Sumatera Barat</name>
	</province>
	<province>
		<code>ID-SS</code>
		<name>Sumatera Selatan</name>
	</province>
	<province>
		<code>ID-SU</code>
		<name>Sumatera Utara</name>
	</province>
	<province>
		<code>ID-JK</code>
		<name>DKI Jakarta</name>
	</province>
	<province>
		<code>ID-YO</code>
		<name>DI Yogyakarta</name>
	</province>
</provinces>