Taman Sari Water Castle, also known as Taman Sari is the site of a former royal garden of the Sultanate of Yogyakarta. It is located about 2 km south within the grounds of the Kraton, Yogyakarta, Indonesia. Built in the mid-18th century, the Taman Sari had multiple functions, such as a resting area, a workshop, a meditation area, a defense area, and a hiding place.
Taman Sari consisted of four distinct areas: a large artificial lake with islands and pavilions located in the west, a bathing complex in the centre, a complex of pavilions and pools in the south, and a smaller lake in the east. Today only the central bathing complex is well preserved, while the other areas have been largely occupied by the Kampung Taman settlement.
The name Taman Sari comes from the Javanese words taman, meaning a "garden" or "park" and sari, which means "beautiful" or "flowers". Hence, the name Taman Sari means an area of a beautiful garden adorned with flowers. An old article described it as a "water castle" as by shutting the watergates, the complex would be completely immersed in water, leaving tall structures standing out.
The building of Taman Sari commenced during the reign of Sultan Hamengkubuwono I (1755–1792), the first sultan of the Yogyakarta Sultanate, and was completed by the time of Sultan Hamengkubuwono II. The building site, however, had already been known as a bathing place called Pacethokan Spring since Sunan Amangkurat IV’s reign (1719–1726). According to Kitab Mamana in Yogyakarta Kraton, the project leader for the construction of Taman Sari was Tumenggung Mangundipura. He had travelled twice to Batavia to learn about European architecture, which is the reason why the architecture of Taman Sari has marks of European style.The Regent of Madiun, Raden Rangga Prawirasentika, participated in funding the construction of Taman Sari. Prawirasentika also beseeched the Sultan to be relieved of Madiun's tax obligation. He offered other alternative ways of payment. The Sultan accepted his proposal. In 1758, the Sultan commanded the Regent to supervise the making of bricks and various complements, which would be used to build a beautiful garden. The sultan wanted a place where he could spend some time to relax after many years of wars that he had just experienced. Raden Tumenggung Mangundipura, under supervision of Raden Arya Natakusuma (who later became Sri Pakualam II), was responsible for the construction. The building was started in 1684 Javanese year (1758 AD). After finding out how large the complex was, Raden Rangga Prawirasentika realized that the cost would have been greater than the taxes. He resigned from the project and was replaced by Prince Natakusuma who continued the project to completion.
Taman Sari was built three years after the Giyanti Agreement as a resting place for Sultan Hamengkubuwono I. The complex consists of about 59 buildings including a mosque, meditation chambers, swimming pools, and a series of 18 water gardens and pavilions surrounded by artificial lakes. The complex was effectively used between 1765–1812.
The British invasion of the Yogyakarta Kraton saw considerable parts of the complex destroyed in 1812.
The building of Taman Sari ended upon the completion of the gates and the walls. A sengkalan memet (a Javanese chronogram) on the western gate (Gedhong Gapura Hageng) marks the year with the Javanese words Lajering Kembang Sinesep Peksi, denoting the Javanese year of 1691 or about 1765: lajering, "core" for 1; kembang, "flower" for 9; sinerep, "suck" or "drink" for 6; peksi, "bird" for 1; the sentence can be read as "birds gathering nectar of the flower". The relief around this sengkalan memet shows birds siphoning honey from flowery trees.
The maintenance of Taman Sari was abandoned shortly after Hamengkubuwono I died, partly because the elaborate hydraulic works were so difficult to maintain. The gardens were neglected and the buildings suffered some damage during the Java War of 1825–1830.
The palace complex fell out of use following an earthquake in 1867, which destroyed several buildings and drained the water features. Over time, squatters began to inhabit the site, surrounding the ruins of the deserted pavilions and filling the empty lakebeds.
In early 1970s, effort at restoration was made. Only the bathing complex has been completely restored.