At CGK, stay airside—distance to the city and unpredictable security queues make staying inside the safest option.
Stay airside at CGK. The one-way rail or road commute from Soekarno-Hatta to central Jakarta takes 40 to 90 minutes depending on traffic, leaving very little time in the city after immigration and the return journey. Terminal 3 has the best lounge and restaurant options at the airport if you need to wait. The CGK Sky Bridge connects Terminal 1 and 2 and has a few cafes and duty-free options.
Take the KA Bandara airport train from Terminal 2 (Stasiun BNI City stop) to Manggarai Station: 40 to 50 minutes, IDR 70,000 ($4.50). From Manggarai, take Grab or Transjakarta bus 1A to Kota Tua (Old Batavia) in about 20 minutes. The Fatahillah Square area, Dutch colonial warehouses, and nearby Cafe Batavia are compact enough to cover in 2 hours. Allow 90 minutes for the return trip and give yourself a 2-hour airport buffer before departure.
Kota Tua plus the Menteng residential district (central Jakarta's tree-lined colonial neighborhood) gives enough variety for 4 to 5 hours in the city. Menteng has good cafes and is 20 minutes from Kota Tua by Grab (IDR 30,000 to 50,000 / $2 to $3). PIK2 oceanfront on the north coast is 25 minutes from the airport by taxi for a modern waterfront alternative.