The development of information technology has brought significant changes to commercial activities, particularly through electronic transactions or electronic commerce (e-commerce). E-commerce transactions provide convenience for parties to enter into agreements without having to meet in person. However, the use of electronic agreements also raises various legal issues, particularly concerning legal protection for consumers and the validity of agreements entered into electronically. The relatively weaker position of consumers compared with business actors necessitates legal certainty in the implementation of electronic agreements. This study aims to examine legal protection for consumers in electronic agreements in e-commerce transactions under Indonesian positive law and to analyze the validity of consumer consent in electronic agreements based on the requirements for a valid agreement under the Indonesian Civil Code (Kitab Undang-Undang Hukum Perdata/KUHPerdata). This study employs a normative legal research method using a statutory approach and a conceptual approach. The study utilizes primary, secondary, and tertiary legal materials, which are analyzed using a qualitative juridical approach. The results show that legal protection for consumers in electronic e-commerce agreements is regulated under several legal provisions, including the Indonesian Civil Code, Law Number 8 of 1999 on Consumer Protection, Law Number 1 of 2024 on the Second Amendment to the Law on Electronic Information and Transactions, and Government Regulation Number 71 of 2019 on the Operation of Electronic Systems and Transactions. Legal protection is provided through the obligation of business actors to provide accurate information, fulfillment of consumer rights, liability for losses, and dispute resolution mechanisms. Furthermore, electronic agreements are considered legally valid as long as they satisfy the requirements stipulated in Article 1320 of the Indonesian Civil Code, namely consent of the parties, legal capacity, a specific object, and a lawful cause. Therefore, electronic agreements have the same legal standing as conventional agreements, provided that they fulfill the applicable requirements for contractual validity under Indonesian law