Bring a pot of water to a rolling boil. Lower the eggs in gently with a spoon. Set a timer for 6½–7 minutes for jammy yolks, or 9 minutes for firmer centers.
Prepare an ice bath. Fill a large bowl with ice and water.
Shock the eggs. When the timer goes off, transfer eggs to the ice bath and let them cool for at least 5 minutes.
This stops cooking and makes peeling easier.
Make the marinade. In a bowl or small pot, combine soy sauce, water, sugar, rice vinegar, and mirin. Stir until the sugar dissolves. Add garlic, ginger, scallions, sesame oil, sesame seeds, and chili if using.
Taste and adjust sweetness or saltiness to your liking.
Peel the eggs carefully. Gently crack and peel under running water to avoid tearing the whites.
Marinate. Place eggs in a lidded container and pour the marinade over. The eggs should be mostly submerged. If not, place a small piece of parchment on top or turn the eggs halfway through.
Chill for at least 4 hours. For best flavor, marinate overnight.
The longer they sit (up to 3 days), the deeper the color and taste.
Serve. Halve the eggs and spoon some marinade over warm rice, noodles, or steamed greens. Finish with extra scallions and sesame seeds.