Nasi Lemak Rice Recipe: Coconut Rice, Done Right

Updated November 25, 2026

Total time
1 hr 5 min
prep 20 min · cook 45 min
Serves
4
portions as written

Jump to recipe

Nasi lemak is Malaysia’s national dish: fragrant rice cooked in coconut milk and pandan, served with a fiery sambal, crisp anchovies, roasted peanuts, cucumber, and a boiled egg. This recipe delivers that iconic coconut rice with a foolproof method—rinsing and toasting the rice first prevents it from turning mushy, while the pandan and ginger infuse every grain with aroma. The sambal is deliberately simple but packs the sweet-spicy punch that makes nasi lemak so addictive.

Ingredients

  • For the rice:
  • 2 cups (400 g) long-grain jasmine rice
  • 1 can (13.5 oz / 400 ml) coconut milk
  • 1 cup (240 ml) water
  • 2 pandan leaves, knotted (or 1 tsp pandan extract)
  • 3 thin slices fresh ginger
  • 1 tsp salt
  • For the sambal:
  • 10 dried red chilies, soaked in hot water 10 min, drained
  • 4 shallots, peeled
  • 3 cloves garlic, peeled
  • 1 tbsp belacan (dried shrimp paste), toasted (substitute 1 tbsp fish sauce)
  • 2 tbsp vegetable oil
  • 1 tbsp tamarind paste mixed with 3 tbsp water, strained
  • 1 tsp sugar (palm sugar if available)
  • Salt to taste
  • For the toppings:
  • 1 cup (50 g) dried anchovies (ikan bilis), rinsed
  • 1/2 cup (75 g) roasted peanuts
  • 1 cucumber, sliced into rounds
  • 4 hard-boiled eggs, peeled and halved

Instructions

  1. Cook the rice: Rinse the jasmine rice under cold water until the water runs clear (about 3 rinses). Drain well. In a medium pot, toast the rice over medium heat for 2 minutes, stirring constantly, until it smells nutty and looks slightly translucent. Add the coconut milk, water, pandan leaves, ginger, and salt. Bring to a gentle simmer, then reduce heat to low, cover tightly, and cook for 15 minutes. Turn off the heat and let it sit, covered, for another 10 minutes. Fluff with a fork before serving.
  2. Make the sambal: While the rice cooks, blend the soaked chilies, shallots, garlic, and toasted belacan into a smooth paste, adding 1–2 tbsp water if needed. Heat the oil in a skillet over medium heat. Fry the paste for 8–10 minutes, stirring frequently, until it darkens and the oil separates. Add the tamarind water, sugar, and salt. Cook another 3–4 minutes until thick. Set aside.
  3. Fry the anchovies: In a separate dry skillet over medium heat, toast the dried anchovies for 3–4 minutes until crisp and golden. Remove and set aside. (Alternatively, deep-fry in 1/2 inch oil for 2 minutes.)
  4. Assemble: Place a generous scoop of coconut rice on each plate. Top with a spoonful of sambal, a handful of anchovies and peanuts, cucumber slices, and half a boiled egg. Serve warm.

Tips

  • Don’t skip toasting the rice: This step keeps the grains separate and prevents the rice from becoming sticky or mushy, a common nasi lemak pitfall.
  • Adjust the sambal heat: For a milder sambal, remove the seeds from the dried chilies before soaking. For extra heat, add a fresh bird’s eye chili to the blend.
  • Belacan substitutes: If you can’t find belacan, use 1 tbsp fish sauce added to the sambal while frying. The flavor will be less funky but still delicious.
  • Make it vegetarian: Omit the anchovies and use a vegetarian sambal (skip the belacan and use soy sauce instead).

Serving Suggestions

Serve nasi lemak as a complete meal with additional sides like fried chicken, beef rendang, or fried fish. For a traditional breakfast, pair it with a cup of hot teh tarik (pulled milk tea) or kopi (black coffee). The sambal can be made ahead and used as a condiment for other dishes.

Variations

  • Blue rice: Add 1/4 cup (60 ml) of blue pea flower tea to the cooking liquid for a striking blue color.
  • Spicy sambal: Add 1 tsp of sambal oelek or extra chilies for a spicier kick.
  • Add protein: Top with fried chicken, grilled fish, or a fried egg for a heartier meal.
  • Use brown rice: Substitute brown jasmine rice, but increase the cooking time to 30 minutes and add 1/2 cup (120 ml) more water.

Storage and Reheating

Store leftover rice and sambal separately in airtight containers. The rice will keep in the refrigerator for up to 3 days, and the sambal for up to 5 days. To reheat, sprinkle the rice with a little water and microwave on high for 1–2 minutes, or steam in a bamboo basket for 5 minutes. The anchovies are best stored in a separate container at room temperature for up to 1 week; they will lose their crunch if refrigerated. Reheat sambal in a small pan over low heat, adding a splash of water if it’s too thick.

Frequently Asked Questions

Can I use regular white rice instead of jasmine? Yes, but jasmine has a better fragrance and slightly stickier texture that holds up to the coconut milk. If using regular long-grain, reduce the cooking time by 2–3 minutes.

What if I can’t find pandan leaves? You can use 1 teaspoon of pandan extract or paste, or substitute with a few drops of vanilla extract for a different but pleasant aroma. The flavor won’t be identical, but the rice will still be delicious.

Is nasi lemak always spicy? Traditionally yes, the sambal is spicy. However, you can adjust the heat to your preference by reducing the number of chilies or removing the seeds. Some versions are mild and sweet, especially for children.

Can I make the sambal ahead of time? Absolutely. In fact, sambal tastes even better the next day as the flavors meld. Store it in the refrigerator for up to 5 days, or freeze for up to 1 month.

Why did my rice turn out mushy? This usually happens if the rice is not rinsed well or if you use too much liquid. Make sure to rinse until the water is clear, and use the exact ratio of 1 part rice to 1 part coconut milk + 1/2 part water. Also, avoid stirring the rice while it cooks.

Can I use canned coconut milk that has separated? Yes, just shake the can well before opening. If it’s still separated, whisk it before adding to the pot. The fat content is fine; it will emulsify during cooking.

Related

More recipes to cook

Safety notes: safe minimum internal temperatures from USDA FSIS; raw and undercooked fish guidance from the U.S. FDA. Food safety notes

Spotted an error? Tell us and we will correct it (corrections policy).