<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.24.0.1</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>164</ContextCount>
  <ElementCount>337</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>47</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>6</UnitCount>
  <MyReports>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>100000 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DocumentDocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>100010 - Statement - Consolidated Balance Sheets</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_StatementConsolidatedBalanceSheets</Role>
      <ShortName>Consolidated Balance Sheets</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>100030 - Statement - Consolidated Balance Sheets (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_StatementConsolidatedBalanceSheetsParenthetical</Role>
      <ShortName>Consolidated Balance Sheets (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>100040 - Statement - Consolidated Statements of Operations and Comprehensive Loss</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/StatementConsolidatedStatementsOfOperationsAndComprehensiveLoss</Role>
      <ShortName>Consolidated Statements of Operations and Comprehensive Loss</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>100050 - Statement - Consolidated Statements of Stockholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/StatementConsolidatedStatementsOfStockholdersEquity</Role>
      <ShortName>Consolidated Statements of Stockholders' Equity</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>100060 - Statement - Consolidated Statements of Cash Flows</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/StatementConsolidatedStatementsOfCashFlows</Role>
      <ShortName>Consolidated Statements of Cash Flows</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>995410 - Disclosure - Pay vs Performance Disclosure</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/PvpDisclosure</Role>
      <ShortName>Pay vs Performance Disclosure</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>995445 - Disclosure - Insider Trading Arrangements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/InsiderTradingArrangements</Role>
      <ShortName>Insider Trading Arrangements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>995457 - Disclosure - The Company</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/DisclosureTheCompany1</Role>
      <ShortName>The Company</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>995467 - Disclosure - Summary of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>995477 - Disclosure - Fair Value Measurements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureFairValueMeasurements</Role>
      <ShortName>Fair Value Measurements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>995487 - Disclosure - Commitment and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureCommitmentAndContingencies</Role>
      <ShortName>Commitment and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>995497 - Disclosure - Collaboration Agreements</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/DisclosureCollaborationAgreements</Role>
      <ShortName>Collaboration Agreements</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>995507 - Disclosure - Balance Sheet Components</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureBalanceSheetComponents</Role>
      <ShortName>Balance Sheet Components</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>995517 - Disclosure - Leases</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureLeases</Role>
      <ShortName>Leases</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>995527 - Disclosure - Stock-based Compensation</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureStockBasedCompensation</Role>
      <ShortName>Stock-based Compensation</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>995537 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureIncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>995547 - Disclosure - Related Party Transactions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureRelatedPartyTransactions</Role>
      <ShortName>Related Party Transactions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>995557 - Disclosure - Net Loss Per Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureNetLossPerShare</Role>
      <ShortName>Net Loss Per Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>995567 - Disclosure - Restructuring</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/DisclosureRestructuring</Role>
      <ShortName>Restructuring</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>995577 - Disclosure - Subsequent Events</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/DisclosureSubsequentEvents</Role>
      <ShortName>Subsequent Events</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>995587 - Disclosure - Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://alector.com/20231231/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPolicies</ParentRole>
      <Position>22</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>995597 - Disclosure - Summary of Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesTables</Role>
      <ShortName>Summary of Significant Accounting Policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://alector.com/20231231/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPolicies</ParentRole>
      <Position>23</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>995607 - Disclosure - Fair Value Measurements (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureFairValueMeasurementsTables</Role>
      <ShortName>Fair Value Measurements (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://alector.com/20231231/taxonomy/role/Role_DisclosureFairValueMeasurements</ParentRole>
      <Position>24</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>995617 - Disclosure - Balance Sheet Components (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureBalanceSheetComponentsTables</Role>
      <ShortName>Balance Sheet Components (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://alector.com/20231231/taxonomy/role/Role_DisclosureBalanceSheetComponents</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>995627 - Disclosure - Leases (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureLeasesTables</Role>
      <ShortName>Leases (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://alector.com/20231231/taxonomy/role/Role_DisclosureLeases</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>995637 - Disclosure - Stock-based Compensation (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureStockBasedCompensationTables</Role>
      <ShortName>Stock-based Compensation (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://alector.com/20231231/taxonomy/role/Role_DisclosureStockBasedCompensation</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>995647 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureIncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://alector.com/20231231/taxonomy/role/Role_DisclosureIncomeTaxes</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>995657 - Disclosure - Net Loss Per Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureNetLossPerShareTables</Role>
      <ShortName>Net Loss Per Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://alector.com/20231231/taxonomy/role/Role_DisclosureNetLossPerShare</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>995677 - Disclosure - Summary of Significant Accounting Policies - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureSummaryOfSignificantAccountingPoliciesAdditionalInformationDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>30</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>995687 - Disclosure - Summary of Significant Accounting Policies - Schedule of Reconciliation of Cash, Cash Equivalents, and Restricted Cash (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/DisclosureSummaryOfSignificantAccountingPoliciesScheduleOfReconciliationOfCashCashEquivalentsAndRestrictedCashDetails</Role>
      <ShortName>Summary of Significant Accounting Policies - Schedule of Reconciliation of Cash, Cash Equivalents, and Restricted Cash (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>31</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>995697 - Disclosure - Fair Value Measurements - Summary of Financial Assets Measured at Fair Value on a Recurring Basis (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureFairValueMeasurementsSummaryOfFinancialAssetsMeasuredAtFairValueOnRecurringBasisDetails</Role>
      <ShortName>Fair Value Measurements - Summary of Financial Assets Measured at Fair Value on a Recurring Basis (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>32</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>995707 - Disclosure - Fair Value Measurements - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureFairValueMeasurementsAdditionalInformationDetails</Role>
      <ShortName>Fair Value Measurements - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>33</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>995717 - Disclosure - Commitment and Contingencies - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/DisclosureCommitmentAndContingenciesAdditionalInformationDetails</Role>
      <ShortName>Commitment and Contingencies - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>34</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>995727 - Disclosure - Collaboration Agreements - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/DisclosureCollaborationAgreementsAdditionalInformationDetails</Role>
      <ShortName>Collaboration Agreements - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>35</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>995737 - Disclosure - Balance Sheet Components - Summary of Property and Equipment, Net (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfPropertyAndEquipmentNetDetails</Role>
      <ShortName>Balance Sheet Components - Summary of Property and Equipment, Net (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>36</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>995747 - Disclosure - Balance Sheet Components - Summary of Accrued Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureBalanceSheetComponentsSummaryOfAccruedLiabilitiesDetails</Role>
      <ShortName>Balance Sheet Components - Summary of Accrued Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>37</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>995757 - Disclosure - Leases - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureLeasesAdditionalInformationDetail</Role>
      <ShortName>Leases - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>38</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>995767 - Disclosure - Leases - Components of Lease Expense (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureLeasesComponentsOfLeaseExpenseDetail</Role>
      <ShortName>Leases - Components of Lease Expense (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>39</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>995777 - Disclosure - Leases - Schedule of Lease Payments Owed Under Company's Operating Leases (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureLeasesScheduleOfLeasePaymentsOwedUnderCompanySOperatingLeasesDetail</Role>
      <ShortName>Leases - Schedule of Lease Payments Owed Under Company's Operating Leases (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>40</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>995787 - Disclosure - Stock-based Compensation - Summary of Recognized Stock-Based Compensation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureStockBasedCompensationSummaryOfRecognizedStockBasedCompensationDetails</Role>
      <ShortName>Stock-based Compensation - Summary of Recognized Stock-Based Compensation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>41</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>995797 - Disclosure - Stock-based Compensation - Summary of Share-based Payment Award, Stock Options, Valuation Assumptions (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/DisclosureStockbasedCompensationSummaryOfSharebasedPaymentAwardStockOptionsValuationAssumptionsDetails</Role>
      <ShortName>Stock-based Compensation - Summary of Share-based Payment Award, Stock Options, Valuation Assumptions (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>42</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>995807 - Disclosure - Stock-based Compensation - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureStockBasedCompensationAdditionalInformationDetails</Role>
      <ShortName>Stock-based Compensation - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>43</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>995817 - Disclosure - Stock-based Compensation - Summary of Options to Purchase Common Stock (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureStockBasedCompensationSummaryOfOptionsToPurchaseCommonStockDetails</Role>
      <ShortName>Stock-based Compensation - Summary of Options to Purchase Common Stock (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>44</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>995827 - Disclosure - Stock-based Compensation - Summary of Restricted Stock Awards and Restricted Stock Units (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/DisclosureStockbasedCompensationSummaryOfRestrictedStockAwardsAndRestrictedStockUnitsDetails</Role>
      <ShortName>Stock-based Compensation - Summary of Restricted Stock Awards and Restricted Stock Units (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>45</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>995837 - Disclosure - Income Taxes - Schedule of Federal and State Income Tax Provision (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/DisclosureIncomeTaxesScheduleOfFederalAndStateIncomeTaxProvisionDetails</Role>
      <ShortName>Income Taxes - Schedule of Federal and State Income Tax Provision (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>46</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>995847 - Disclosure - Income Taxes - Schedule of Effective Income Tax Rate Reconciliation (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/DisclosureIncomeTaxesScheduleOfEffectiveIncomeTaxRateReconciliationDetails</Role>
      <ShortName>Income Taxes - Schedule of Effective Income Tax Rate Reconciliation (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>47</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>995857 - Disclosure - Income Taxes - Schedule of Deferred Tax Assets and Liabilities (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/DisclosureIncomeTaxesScheduleOfDeferredTaxAssetsAndLiabilitiesDetails</Role>
      <ShortName>Income Taxes - Schedule of Deferred Tax Assets and Liabilities (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>48</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>995867 - Disclosure - Income Taxes - Additional Information (Detail)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureIncomeTaxesAdditionalInformationDetail</Role>
      <ShortName>Income Taxes - Additional Information (Detail)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>49</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>995877 - Disclosure - Income Taxes - Schedule of Unrecognized Tax Benefits (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/DisclosureIncomeTaxesScheduleOfUnrecognizedTaxBenefitsDetails</Role>
      <ShortName>Income Taxes - Schedule of Unrecognized Tax Benefits (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>50</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>995887 - Disclosure - Related Party Transactions - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureRelatedPartyTransactionsAdditionalInformationDetails</Role>
      <ShortName>Related Party Transactions - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>51</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>995897 - Disclosure - Net Loss Per Share - Schedule of Dilutive Shares Excluded from Calculation of Diluted Net Loss Per Share (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/Role_DisclosureNetLossPerShareScheduleOfDilutiveSharesExcludedFromCalculationOfDilutedNetLossPerShareDetails</Role>
      <ShortName>Net Loss Per Share - Schedule of Dilutive Shares Excluded from Calculation of Diluted Net Loss Per Share (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>52</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>995907 - Disclosure - Restructuring - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/DisclosureRestructuringAdditionalInformationDetails</Role>
      <ShortName>Restructuring - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>53</Position>
    </Report>
    <Report instance="alec-20231231.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>995917 - Disclosure - Subsequent Events - Additional Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://alector.com/20231231/taxonomy/role/DisclosureSubsequentEventsAdditionalInformationDetails</Role>
      <ShortName>Subsequent Events - Additional Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>54</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File doctype="10-K" isDefinitelyFs="true" isUsgaap="true" original="alec-20231231.htm">alec-20231231.htm</File>
    <File>alec-20231231.xsd</File>
  </InputFiles>
  <SupplementalFiles>
    <File>img43903234_0.gif</File>
    <File>img43903234_1.gif</File>
    <File>img43903234_10.jpg</File>
    <File>img43903234_11.gif</File>
    <File>img43903234_12.gif</File>
    <File>img43903234_13.jpg</File>
    <File>img43903234_14.gif</File>
    <File>img43903234_15.gif</File>
    <File>img43903234_16.gif</File>
    <File>img43903234_17.jpg</File>
    <File>img43903234_18.gif</File>
    <File>img43903234_2.gif</File>
    <File>img43903234_3.gif</File>
    <File>img43903234_4.gif</File>
    <File>img43903234_5.gif</File>
    <File>img43903234_6.gif</File>
    <File>img43903234_7.gif</File>
    <File>img43903234_8.gif</File>
    <File>img43903234_9.gif</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="620">http://fasb.org/us-gaap/2023</BaseTaxonomy>
    <BaseTaxonomy items="40">http://xbrl.sec.gov/dei/2023</BaseTaxonomy>
    <BaseTaxonomy items="4">http://xbrl.sec.gov/ecd/2023</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>false</HasPresentationLinkbase>
  <HasCalculationLinkbase>false</HasCalculationLinkbase>
</FilingSummary>
