Indonesian nationality law is regulated by the 1945 Constitution, as amended; various statutes on nationality, as revised over time; as well as international agreements to which Indonesia has been a signatory. These laws determine who is, or is eligible to be, a national of Indonesia. The legal means to acquire nationality and formal membership in a nation differ from the relationship of rights and obligations between a national and the nation, known as citizenship. Indonesian nationality is typically obtained either on the principle of Jus sanguinis, i.e. by birth abroad to at least one parent with Indonesian nationality; or under Restricted Jus soli, i.e. by birth in Indonesia. It can also be granted to a permanent resident who has lived in Indonesia for a given period of time through naturalization, as long as the parents are stateless, or unknown.
 Nationality can be acquired in Indonesia through adoption, birth, marriage, or naturalization.
 Children under five years old who have been adopted by at least one parent who is an Indonesian national are eligible for Indonesian nationality. Indonesian children adopted by foreign parents are also considered to be Indonesian until they reach legal majority and choose a nationality.
 Individuals who are eligible to be considered Indonesian by birth include:
 Foreign spouses of Indonesian nationals are eligible to choose Indonesian nationality by declaration before the authorities. Five continuous, or ten cumulative years residence in the country is required and the spouse must renounce their nationality of origin or obtain a permit to stay in Indonesia with dual nationality.
 There are two types of naturalization in Indonesia. Ordinary naturalization requires that an applicant be of legal majority and full capacity. Application fees and documentation are submitted to the Minister of Law and Human Rights. Establishment of a five-year residency, or ten years of intermittent cumulative residence, prior to application is required. Applicants must be in good physical and mental health; be financially self-sufficient; and prove that they have no criminal record which resulted in a jail sentence of one or more years. They must also confirm that they can speak the Indonesian language and provide proof of a basic knowledge of Indonesian civics. Applications are approved at the discretion of the President of Indonesia and if approved, require the applicant to renounce other nationality. 
 The other type of naturalization is for exceptional merit, including contributions to culture, the environment, humanity, science, sport, or technology, which can or will enhance the nation. Public or private organizations can propose a candidate to the Minister of Law and Human Rights for their extraordinary contributions. Parliament must consider the application and final approval rests with the President of Indonesia.
 Indonesians may voluntarily renounce their nationality if they have reached legal majority, have full capacity and will not be rendered stateless by such renunciation. Those who have lost their nationality may generally reacquire it through Ministerial approval or applying for naturalization. Persons may be denaturalized for:
 Dual nationality is not typically allowed in Indonesia. However, after lobbying from women's rights groups, in 2006, the nationality law was revised to allow children to retain dual nationality until they reach legal majority of seventeen. By that age those who have not chosen their nationality are required to obtain an affidavit for a Limited Indonesian Dual Nationality Passport (Indonesian: Paspor Warga Negara Indonesia Ganda Terbatas) to retain dual status. After reaching the age of twenty-one, they must choose a single nationality.
 The written history of Indonesia encompasses 800 years, spanning some 400 now autonomous regions and  including in the boundaries of the archipelagic country around 18,000 islands. For centuries before European colonization, the various islands were linked either by trade or familial ties and at various times shared rulers.
 From the 2nd and 3rd centuries of the Common Era, Indian cultural practices slowly expanded into Southeast Asia. Art, governance structures, and religion were absorbed and modified by the early inhabitants of the islands, Austronesian peoples, who lived in scattered tribal settlements, which were united by kinship ties. Physical isolation and limited communications created difficulties in maintaining centralized authority over vast distances, thus typically governance existed in a system of limited kingship with autonomous regional leaders to direct affairs in their territories. In exchange for their allegiance, local populations received protection, prestige, and a share of wealth from their leaders. As states emerged, from the 6th to 9th centuries, their rulers followed imported religions like Hinduism and Buddhism. Though they did not follow India's caste system, the early kingdoms used the terminology of Indian courts to delineate the power divisions within their territory. These kingdoms were founded on trade relationships and some established tributary relationships with China to facilitate both commerce and protection ties. Trade routes between China and the Middle East were maintained primarily by use of the sea routes through the waters of the archipelago and Arabic envoys stationed with the Chinese court acted as emissaries to the kingdoms in the archipelago. By the 11th century Buddhist and Hindu kingdoms began to decline and slowly be replaced by rulers from the growing Islamic movement from the 12th century. Between the 13th and 16th centuries, Islamic sultanates had spread from northern Sumatra to the eastern part of the archipelago.
 Portuguese merchants, eager to sever the monopoly Muslim merchants and their Venetian commerce-brokers held over the spice trade, were encouraged by Prince Henry the Navigator to use naval war to gain control of the archipelago. Afonso de Albuquerque sailed to India in 1503 and conquered Goa in 1510, establishing a trading base for the Portuguese. From Goa, Albuquerque sailed to Malacca with over a dozen ships and conquered the sultans there in 1511. Immediately, Francisco Serrão launched an exploration from Malacca to find the spice islands to the east, but was shipwrecked in 1512. The survivors made their way to Ambon Island and endeared themselves to the local ruler by attacking a rival. Hearing of the incident, the sultans of the neighboring islands, Tĕrnate and Tidore, sought to build alliances with the Portuguese. With the Portuguese came Christian missionaries, notably Francis Xavier, one of the founders of the Jesuit Order, who introduced and spread Christianity to the archipelago.
 In 1521, the Ordinances of Afonso V [pt] (Portuguese: Ordenações Afonsinas) of 1446 were replaced by the Ordinances of Manuel I (Portuguese: Ordenações Manuelinas). Under the ordinances, courts were granted the ability to interpret common law, statues, and custom creating opinion for newly arisen situations. In areas of the kingdom without established High Courts, common law and local custom prevailed. Nationals were those born in the territory and leaving the territory without permission of the sovereign was grounds for denaturalization.
In 1603, the Ordinances of Philip I [pt] (Portuguese: Ordenações Filipinas) established that Portuguese nationals were children born on the Iberian Peninsula or adjacent islands, Brazil, or to an official in service to the crown in the Portuguese possessions of Africa or Asia, whose father was a native of Portugal, or whose mother was a native of Portugal and was married to a foreigner who had established domicile in Portugal for a minimum of ten years. Those who were not in service to the crown in the colonies (except Brazil) were not considered to be Portuguese.
 The Portuguese period on the archipelago fundamentally changed the Asian trading system. The Portuguese dismantled the system of policing the Straits of Malacca to protect commercial vessels and dispersed the trade centers to various ports. The period was characterized by conflict between various sultans and the Portuguese. Islanders quickly mastered navigational and military technology the Portuguese had brought, and the Portuguese were never able to successfully dominate trade. Dutch merchants had acted as middlemen in selling Portuguese spices to Europe, but during the Dutch Revolt (1566–1648) against Spain, their access to spices was curtailed by the Iberian Union of Spain and Portugal. Recognizing the weak position of the Portuguese in the archipelago, Cornelis de Houtman led an expedition in 1595 to Java. Though he lost most of his ships, the profit gained from the spices gathered during the trip spurred other Dutch voyages. In 1598, the Dutch parliament proposed a merger of Dutch trading agents and in 1602, the Dutch East India Company was formed. In 1600 the Dutch won a naval battle at Ambon and joined the Muslim Hituese in an alliance against Portugal. The Portuguese regrouped but in a second battle in 1605, surrendered to the alliance.
 From 1610 to 1619 the Dutch East India Company centered on Ambon. In 1619, Jan Pieterszoon Coen became the Governor-General of the Dutch East Indies and embarked on a plan to establish Dutch power through force and gain the spice monopoly in the region. He attacked Banten troops, capturing Batavia moved the headquarters there. Outside of the base in Java, the Dutch established outposts throughout the islands, but their impact was minimal until the latter half of the 18th century. Because the Dutch colonies were founded as commercial enterprises, nationality did not play a large role in the governance. Roman-Dutch law served as the legal code of the colony, and there was no national civil law defining the rights and obligations of inhabitants. In 1809, King Louis Napoleon ordered that the Netherlands adopt a modification of the Civil Code of France, which was replaced two years later with the French Code. Attempts to draft a new code, after the Netherlands regained independence in 1813, were unsuccessful until 1838. The Civil Code of 1838 provided that persons born in the Netherlands or its colonies were Dutch nationals. Under the variations of the civil code, married women were legally incapacitated, dependent upon their husbands, and automatically derived the nationality of their husbands. 
 The Nationality Act of 1850 made distinctions between who were entitled to rights, differentiating  between those born in the Netherlands or descended of Dutch citizens, who had political rights, and those who were native inhabitants in Dutch colonies, who were excluded from rights. A revised Nationality Act in 1892 changed acquisition of nationality from place of birth to descent from a Dutch father and became effective in 1893, stripping the majority of the inhabitants of the archipelago of any nationality. Foreigners who had lived in the Netherlands or one of the colonies for five years were able to naturalize after reaching legal adulthood and renouncing their prior nationality. Naturalization of a male automatically changed the nationality of his wife and minor children. Changes were made in 1910 to the nationality scheme which rendered individuals living in the archipelago as "Dutch subject, non-Dutch citizens", a status that would remain until Indonesia gained independence in 1949. 
 In 1925, the Constitution of the Dutch East Indies (Dutch: Indische Staatsregeling) solidified the racial segregation of the population by granting the European, Arab, and Asian population higher socio-political status than native inhabitants of the peninsula, despite the fact that around 97% of the population were indigenous. The Chinese Nationality Act of 1929 created a never-resolved issue between Dutch and Chinese authorities, as Chinese policy was to record every person of Chinese descent, regardless of their place of birth, as a Chinese national. Under the Dutch legal system, Europeans were granted rights and family law matters were controlled by customary or religious law. In 1945, Indonesia declared independence and drafted a constitution which provided in Chapter X Article 27, "without any exception, all citizens shall have equal position in Law and Government". Custom dictated that women and children were subordinated to men and in general women's roles in ethnic groups, families, and religious communities were deemed more important than becoming part of the polity. In  1946, Law No. 3, the first Indonesian nationality law was promulgated. It based nationality upon birth in the territory and required that a married woman have the same nationality as her husband. Wives were prohibited from individually obtaining nationality and derivative nationality for children was through their paternal relationship. Ordinary naturalization of foreigners required persons of legal majority to speak the Indonesian language and to have lived in the territory for a minimum of five years. The Netherlands did not recognize Indonesian independence until 1949.
 On December 27, 1949, a conference was held in The Hague to draft an agreement under which the Dutch officially recognized Indonesian sovereignty. Under the terms of the Charter Approving the Distribution of Citizens (Indonesian: Piagam Persetujuan Pembagian Warga Negara), Dutch nationals were granted a two-year window to choose between retaining their status as Dutch or becoming Indonesian nationals if they had lived in the country for six months. Those who were classified as "Dutch subjects, non-Dutch citizens" automatically became nationals of Indonesia and lost their Dutch nationality. Chinese people living in Indonesia were also given the option of becoming Indonesian nationals, though only 60% of them chose to be Indonesian. The Constitution of 1950, which changed the government from a federation to a unitary state, called for the propagation of a new nationality law, maintaining the provisions of the Charter until the law was drafted. In 1953, drafting began and that same year negotiations were opened with China  to resolve the matter of dual nationality. The Sino-Indonesian Dual Nationality Treaty was signed in 1955, providing a two-year period in which dual nationals of China and Indonesia were to choose a single nationality and renounce their other status. The two-year period applied from 1960 to those who had already reached legal majority, or to those who were minors upon reaching majority. Failure to make a declaration resulted in the automatic acquisition of the nationality of the father.
 Law No. 62 of 1958 changed the nationality scheme from birth in the territory to a system based on descent, but had exceptions for foundlings and stateless children to be recognized as Indonesian through birth in the territory. Because Law No. 62 did not recognize dual nationality, women who were married to foreigners continued to derive nationality from their husbands; however, children of divorceés or those born illegitimately could renounce any existing nationality and apply to the Minister of Justice for derivative nationality through their mothers. In 1967, the People's Republic of China and Indonesia severed diplomatic relations ending the Dual Nationality Treaty's terms in 1969. From the 1965 attempted coup d'etat and development of the New Order in Indonesia, discriminatory policies against ethnic Chinese escalated. In 1974, women's groups pressured the government to revise the marriage laws. Under the terms of Marriage Law No. 1, the colonial system which had four different schemes — European Civil Code, Ordinance for Christian Indonesians, Islamic law, and the Regulation for Mixed Marriages — was replaced by a single code. Under the statute, previous laws concerning marriage were voided and replaced by explicit provisions that marriage did not effect nationality, that parties to a marriage were equal, and that each partner had legal capacity. The 1945 Constitution was not amended under President Suharto, but when he stepped down from office in 1998, amendments were adopted in 1999, 2000, 2001, and 2002. Most of the changes dealt with limitations and decentralization of authority.
 Women's groups, including the Alliansi Pelangi Antar Bangsa (Rainbow Alliance Between Nations, APAB), Jaringan Kerja Prolegnas Pro Perempuan (Network for Pro-Women National Legislation Programme, JKP3), and Keluarga Perkawinan Campuran Melati (Jasmine Flower Community of Mixed Marriages, KPC Melati) began pushing from the return of democracy for legal changes on the nationality of women. Many of the activists were in trans-national marriages and were effected by the laws which in cases of divorce granted custody of the children to the father or did not allow mothers married to foreigners to pass their nationality on to their children. In 2006, these groups were successful in amending the Nationality Law No. 12 to allow children to derive nationality from their mothers and if their parents have different nationality, to hold dual nationality until they reach the age of eighteen at which time they must choose a single nationality. The modification also allowed an Indonesian woman the right to sponsor her foreign spouse for naturalization.