The economy of Sarawak is the fourth-largest of the states of Malaysia, making up 9.3% of the Malaysian gross domestic product (GDP) in 2022. Meanwhile, Sarawak is home to 7.9% of the Malaysian population (2.56 million out of 32.4 million people in Malaysia) based on the 2020 census.

Sarawak economy has traditionally heavily depended on natural resource extraction and exports, including oil and gas, timber and palm oil. These commodities still produce a significant proportion of Sarawak's gross domestic product. Main trade partners of Sarawak are: Peninsular Malaysia, China, and Japan.

History Brooke era The first Rajah of Sarawak, James Brooke, who ruled from 1841 to 1868, did not engage in noticeable commercial or financial activities during his rule. Economic development began to progress slowly during the reign of his successor, Charles Brooke, from 1868 to 1917. Agriculture was the main focus of economic development, and international trade of local agricultural produce increased; for example the export of sago products to Singapore. Charles Brooke introduced a liberal land policy and encouraged the introduction of new cash crops. He also promoted the immigration of Chinese as peasant farmers. During the era of Charles Vyner Brooke (1917–1946), he continued his predecessor's policy of promoting land cultivation and food self-sufficiency. However, he opposed opening up the state for western capitalist economies and Chinese immigration.

During this period, the five main ethnic groups in Sarawak engaged in different economic activities based on their geographical location. The Malays lived near the rivers of Kuching, Samarahan, and Sri Aman, thus allowing them to trade. They brought goods such as salt, iron, and clothes to inland areas in exchange for rice and jungle products. The Iban people were engaged in shifting cultivation, while the Bidayuhs, who lived on hills, were engaged in hill paddy cultivation. The Melanaus stayed in Mukah where they produced sago for trade with Brunei Malay traders. The Chinese settlers were mainly from Guangdong and Fujian provinces. They became involved in various economic activities such as mining, trading, and cash crop plantations. For example, the Hakka people were involved in gold mining at Bau during the early days of Brooke rule. The Brooke government had encouraged the planting of cash crops such as rubber, pepper, gambier, sago, sugar cane, tea, coffee, tobacco, and rice. However, only rubber, sago, pepper and gambier planting were successful. These products were then exported to Singapore.

Food production relied entirely on subsistence agriculture by the Malays, Melanaus, and some Dayaks. They cultivated swamp paddy at lowland areas. Most of the Dayaks cultivated hill paddy at highland areas. Despite vast tracts of empty land available for cultivation, total paddy production was insufficient to meet the demand of the local population and rice have to be imported especially in the 1930s. One of such reasons was due to tendency of the local population to cultivate cash crops that can command a higher price than paddy such as coconut, sago, and rubber. In 1938, Brooke government invited C.L. Newman from Malayan Agriculture Service to survey the prospects of wet paddy plantations in Sarawak. Newman opined that second (today Sri Aman Division) and third division (today Sibu Division) are suitable for bunded paddy plantations with Banjar people's from Kalimantan. Instead of constructing major irrigation works, he suggested controlled drainage of existing paddy fields. Much of his work focused on constructing paddy demonstration and test plots in Kanowit, and the control the water drainage of paddy plots in Lundu, Simanggang, and Miri before the World War II. The Brooke government also made reservations for plots of land exclusively for paddy cultivation for example at Tanjong Beluku at Simunjan where 100 paddy lots were laid out. During the Brooke era, Japanese Nissa Shokai Estate started on an intensive, irrigated paddy cultivation at upper Samarahan in 1935. Rationing of rice, introduced in 1941, discouraged the Malays and Dayaks to use income from rubber to purchase rice, and had helped to persuade them to plant rice instead. Campaigns were introduced to encourage farmers to plant other food stuffs such as vegetables. However, all these measures had limited impact on food imports as European theatre of World War II broke out in 1939, thus making rubber prices attractive. This made 1940 Sarawak rice import to stand at an all-time high of 38,000 tonnes, valued at 3,650,000 dollars.

In the 1900s, Sarawak's total exports was only 6.1% of Malaya's; 38 years later, the total exports stood at 7.1% of Malaya's. The amount of trade was relatively small when compared to its vast territorial expense. The Sarawak government's revenue in 1900 and 1938 were 5.9% and 6.8% respectively of its Malaya counterparts in Federated Malay States. On the whole, the Sarawak economy was mostly stagnant during the Brooke era, especially compared to nearby British colonies such as the Federated Malay States, Straits Settlements, and Lower Myanmar. On the other hand, the lack of economic development led to an absence of social problems associated elsewhere with economic growth.

Japanese occupation While the Japanese occupation of Sarawak from 1941 to 1945 brought many negative socio-economic consequences, Sarawak achieved food self-sufficiency through coercive measures. Those who did not cooperate, will be liable for work projects elsewhere. After conquered Sarawak, the Japanese immediately sought to export raw materials especially timber and oil to resupply their arm forces. The Japanese drilled 16 new oil wells at Miri and Seria (Seria is part of Brunei), but only managed to restore to half of the pre-war production by 1945. Total wartime production was 11 million barrels from both oil fields. Besides, coal were mined at Silantek, Second Division of Sarawak (today Sri Aman Division), but production figures was not known. Besides, Japanese started logging operations at the Rajang basin with the assistance of Chinese businessmen to make boats that load raw materials into larger Japanese ships. The Japanese took control of all sawmills in Sibu and Bintulu. In Bintulu alone, more than 4000 tons of sawn timber were milled. The Japanese also owned a sawmill in Lawas for construction of a fort at Muara and repair works at Seria oilfields. The Japanese relied on forced labour from Dayak, Chinese, and Javanese to build airfields in Sibu and Bintulu.

The Japanese issued their own currencies and put banks under exclusive control of the Japanese. Chinese businesses were merged into few centralised stores for ease of control. The Chinese communities in Sarawak were obliged to contribute a total of 1.9 million dollars to fund Japanese war efforts. The Japanese also opened up the Sarawak economy to Japanese companies such as Mitsui Norin and Mitsui Bussan, which controlled food production and trade, Mitsubishi (operating as Tawao Sangyo in Borneo) dominated sago industry, and Nissan Norin which controlled production of coconut oil. Mitsui Bussan acquired paddy indiscriminately from the paddy farmers around Kuching at a price set below its production costs, depriving the farmers of their own paddy needs. This had forced the farmers to depend their food supplies on sago for months before the next harvest. The system adopted by Mitsui Bussan had aggravated the food shortage problem. An extensive black market emerged in response to the food shortage. The Japanese maintained The Department of Agriculture in Kuching until March 1942 before it was absorbed into Department of Industries (Sangyo Ka). After September 1943, the department of agriculture was reduced into Bureau of Information and Mitsui Norin became solely responsible for agriculture development in Sarawak.

During the first six months of occupation, the Japanese started government run agricultural stations and government subsidised settlement schemes in order increase food crop production. Agricultural stations were started at Semengok, Tarat agricultural station at 34th mile, Simanggang Road, and at Sekama, all within the jurisdiction of Kuching Division. Tarat agricultural station also doubled as agricultural training centre, with medium of instruction as Japanese language. Japanese government chose a suitable area for settlement scheme, then divide them up into lots. Then, a leader was chosen to recruit other settlers and manage the settlement schemes. Those settlers would build their own homes using building materials from the Japanese government free of charge. However, tools, food rations, cash payments from the government were treated as loans and will be supplied for one year and be repaid in installments. Settlers would then plant specified crops such as rice, sweet potatoes, and maize on their allocated lots. The government will buy all the produce from the settlements at a fixed price set in advance. A total of 1000 hectares of land were used for food cultivation, mostly around the Simanggang road, during Japanese administration. Most notably, food cultivation scheme at Bijat, Simanggang kept Kuching District fed throughout the war. It continued to produce 36 tonnes of rice per month one year after the Second World War. However, Japanese food production schemes brought more negative outcomes than positive ones. There was no plans to store excess food or providing logistics to the market. The administration also broke its promise of buying food at a predetermined price and had unilaterally terminated food rations and cash payments before the one-year period. Settlers who lived inland, have a hard time of finding river transport to market the produce themselves, thus food items were left to rot at the roadside. Little is known about agricultural production activities in other divisions in Sarawak.

The Japanese neglected basic infrastructure developments in Sarawak such as roads, health and education facilities.

Federation of Malaysia During its first few decades as part of Malaysia, the economy was dominated almost entirely by natural resources and commodities such as oil and gas, timber and palm oil. This resulted in rapid but volatile growth. Between 1967 and 1973, a boom in petroleum exports and price led to "mining and quarrying" going from less than 1% to almost a fifth of the economy. This expansion in value was not reflected in an expansion in employment, with the industry continuing to employ less than 1% of the population during this time.