<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.25.4</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>265</ContextCount>
  <ElementCount>553</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>false</FootnotesReported>
  <SegmentCount>86</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>7</UnitCount>
  <MyReports>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>0000001 - Document - Cover Page</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/CoverPage</Role>
      <ShortName>Cover Page</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>0000002 - Document - Audit Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/AuditInformation</Role>
      <ShortName>Audit Information</ShortName>
      <MenuCategory>Cover</MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R3.htm</HtmlFileName>
      <LongName>9952151 - Statement - CONSOLIDATED STATEMENTS OF EARNINGS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/CONSOLIDATEDSTATEMENTSOFEARNINGS</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF EARNINGS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R4.htm</HtmlFileName>
      <LongName>9952152 - Statement - CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/CONSOLIDATEDSTATEMENTSOFCOMPREHENSIVEINCOME</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF COMPREHENSIVE INCOME</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R5.htm</HtmlFileName>
      <LongName>9952153 - Statement - CONSOLIDATED BALANCE SHEETS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/CONSOLIDATEDBALANCESHEETS</Role>
      <ShortName>CONSOLIDATED BALANCE SHEETS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R6.htm</HtmlFileName>
      <LongName>9952154 - Statement - CONSOLIDATED BALANCE SHEETS (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/CONSOLIDATEDBALANCESHEETSParenthetical</Role>
      <ShortName>CONSOLIDATED BALANCE SHEETS (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R7.htm</HtmlFileName>
      <LongName>9952155 - Statement - CONSOLIDATED STATEMENTS OF CASH FLOWS</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/CONSOLIDATEDSTATEMENTSOFCASHFLOWS</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF CASH FLOWS</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>9952156 - Statement - CONSOLIDATED STATEMENTS OF SHAREHOLDERS' EQUITY</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/CONSOLIDATEDSTATEMENTSOFSHAREHOLDERSEQUITY</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF SHAREHOLDERS' EQUITY</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>9952157 - Statement - CONSOLIDATED STATEMENTS OF SHAREHOLDERS' EQUITY (Parenthetical)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/CONSOLIDATEDSTATEMENTSOFSHAREHOLDERSEQUITYParenthetical</Role>
      <ShortName>CONSOLIDATED STATEMENTS OF SHAREHOLDERS' EQUITY (Parenthetical)</ShortName>
      <MenuCategory>Statements</MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R10.htm</HtmlFileName>
      <LongName>9952158 - Disclosure - Summary of Significant Accounting Policies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/SummaryofSignificantAccountingPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>10</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R11.htm</HtmlFileName>
      <LongName>9952159 - Disclosure - Segment Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/SegmentInformation</Role>
      <ShortName>Segment Information</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>11</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R12.htm</HtmlFileName>
      <LongName>9952160 - Disclosure - Inventories</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/Inventories</Role>
      <ShortName>Inventories</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>12</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R13.htm</HtmlFileName>
      <LongName>9952161 - Disclosure - Property, Plant and Equipment</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/PropertyPlantandEquipment</Role>
      <ShortName>Property, Plant and Equipment</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>13</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R14.htm</HtmlFileName>
      <LongName>9952162 - Disclosure - Income Taxes</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/IncomeTaxes</Role>
      <ShortName>Income Taxes</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>14</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>9952163 - Disclosure - Debt</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/Debt</Role>
      <ShortName>Debt</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>15</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>9952164 - Disclosure - Shareholders' Equity</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/ShareholdersEquity</Role>
      <ShortName>Shareholders' Equity</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>16</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R17.htm</HtmlFileName>
      <LongName>9952165 - Disclosure - Share-Based Awards, Purchase Plans and Compensation Cost</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/ShareBasedAwardsPurchasePlansandCompensationCost</Role>
      <ShortName>Share-Based Awards, Purchase Plans and Compensation Cost</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>17</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R18.htm</HtmlFileName>
      <LongName>9952166 - Disclosure - Earnings per Share</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/EarningsperShare</Role>
      <ShortName>Earnings per Share</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>18</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R19.htm</HtmlFileName>
      <LongName>9952167 - Disclosure - Retirement Benefits</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/RetirementBenefits</Role>
      <ShortName>Retirement Benefits</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>19</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R20.htm</HtmlFileName>
      <LongName>9952168 - Disclosure - Commitments and Contingencies</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/CommitmentsandContingencies</Role>
      <ShortName>Commitments and Contingencies</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>20</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R21.htm</HtmlFileName>
      <LongName>9952169 - Disclosure - Acquisitions</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/Acquisitions</Role>
      <ShortName>Acquisitions</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>21</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.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>22</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>995447 - Disclosure - Insider Trading Policies and Procedures</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/ecd/role/InsiderTradingPoliciesProc</Role>
      <ShortName>Insider Trading Policies and Procedures</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>23</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R24.htm</HtmlFileName>
      <LongName>995550 - Disclosure - Cybersecurity Risk Management and Strategy Disclosure</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/cyd/role/CybersecurityRiskManagementAndStrategyDisclosure</Role>
      <ShortName>Cybersecurity Risk Management and Strategy Disclosure</ShortName>
      <MenuCategory>Notes</MenuCategory>
      <Position>24</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R25.htm</HtmlFileName>
      <LongName>9955511 - Disclosure - Summary of Significant Accounting Policies (Policies)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesPolicies</Role>
      <ShortName>Summary of Significant Accounting Policies (Policies)</ShortName>
      <MenuCategory>Policies</MenuCategory>
      <ParentRole>http://www.graco.com/role/SummaryofSignificantAccountingPolicies</ParentRole>
      <Position>25</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R26.htm</HtmlFileName>
      <LongName>9955512 - Disclosure - Summary of Significant Accounting Policies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesTables</Role>
      <ShortName>Summary of Significant Accounting Policies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.graco.com/role/SummaryofSignificantAccountingPolicies</ParentRole>
      <Position>26</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R27.htm</HtmlFileName>
      <LongName>9955513 - Disclosure - Segment Information (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/SegmentInformationTables</Role>
      <ShortName>Segment Information (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.graco.com/role/SegmentInformation</ParentRole>
      <Position>27</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R28.htm</HtmlFileName>
      <LongName>9955514 - Disclosure - Inventories (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/InventoriesTables</Role>
      <ShortName>Inventories (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.graco.com/role/Inventories</ParentRole>
      <Position>28</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>9955515 - Disclosure - Property, Plant and Equipment (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/PropertyPlantandEquipmentTables</Role>
      <ShortName>Property, Plant and Equipment (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.graco.com/role/PropertyPlantandEquipment</ParentRole>
      <Position>29</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>9955516 - Disclosure - Income Taxes (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/IncomeTaxesTables</Role>
      <ShortName>Income Taxes (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.graco.com/role/IncomeTaxes</ParentRole>
      <Position>30</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R31.htm</HtmlFileName>
      <LongName>9955517 - Disclosure - Debt (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/DebtTables</Role>
      <ShortName>Debt (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.graco.com/role/Debt</ParentRole>
      <Position>31</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R32.htm</HtmlFileName>
      <LongName>9955518 - Disclosure - Shareholders' Equity (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/ShareholdersEquityTables</Role>
      <ShortName>Shareholders' Equity (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.graco.com/role/ShareholdersEquity</ParentRole>
      <Position>32</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R33.htm</HtmlFileName>
      <LongName>9955519 - Disclosure - Share-Based Awards, Purchase Plans and Compensation Cost (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/ShareBasedAwardsPurchasePlansandCompensationCostTables</Role>
      <ShortName>Share-Based Awards, Purchase Plans and Compensation Cost (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.graco.com/role/ShareBasedAwardsPurchasePlansandCompensationCost</ParentRole>
      <Position>33</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R34.htm</HtmlFileName>
      <LongName>9955520 - Disclosure - Earnings per Share (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/EarningsperShareTables</Role>
      <ShortName>Earnings per Share (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.graco.com/role/EarningsperShare</ParentRole>
      <Position>34</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R35.htm</HtmlFileName>
      <LongName>9955521 - Disclosure - Retirement Benefits (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/RetirementBenefitsTables</Role>
      <ShortName>Retirement Benefits (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.graco.com/role/RetirementBenefits</ParentRole>
      <Position>35</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R36.htm</HtmlFileName>
      <LongName>9955522 - Disclosure - Commitments and Contingencies (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/CommitmentsandContingenciesTables</Role>
      <ShortName>Commitments and Contingencies (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.graco.com/role/CommitmentsandContingencies</ParentRole>
      <Position>36</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R37.htm</HtmlFileName>
      <LongName>9955523 - Disclosure - Acquisitions (Tables)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/AcquisitionsTables</Role>
      <ShortName>Acquisitions (Tables)</ShortName>
      <MenuCategory>Tables</MenuCategory>
      <ParentRole>http://www.graco.com/role/Acquisitions</ParentRole>
      <Position>37</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R38.htm</HtmlFileName>
      <LongName>9955524 - Disclosure - Summary of Significant Accounting Policies (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesNarrativeDetails</Role>
      <ShortName>Summary of Significant Accounting Policies (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesTables</ParentRole>
      <Position>38</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R39.htm</HtmlFileName>
      <LongName>9955525 - Disclosure - Summary of Significant Accounting Policies (Assets and Liabilities Measured at Fair Value) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesAssetsandLiabilitiesMeasuredatFairValueDetails</Role>
      <ShortName>Summary of Significant Accounting Policies (Assets and Liabilities Measured at Fair Value) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesTables</ParentRole>
      <Position>39</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R40.htm</HtmlFileName>
      <LongName>9955526 - Disclosure - Summary of Significant Accounting Policies (Allowance for Credit Loss) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesAllowanceforCreditLossDetails</Role>
      <ShortName>Summary of Significant Accounting Policies (Allowance for Credit Loss) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesTables</ParentRole>
      <Position>40</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R41.htm</HtmlFileName>
      <LongName>9955527 - Disclosure - Summary of Significant Accounting Policies (Other Current Assets) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesOtherCurrentAssetsDetails</Role>
      <ShortName>Summary of Significant Accounting Policies (Other Current Assets) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesTables</ParentRole>
      <Position>41</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R42.htm</HtmlFileName>
      <LongName>9955528 - Disclosure - Summary of Significant Accounting Policies (Property, Plant and Equipment) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesPropertyPlantandEquipmentDetails</Role>
      <ShortName>Summary of Significant Accounting Policies (Property, Plant and Equipment) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesTables</ParentRole>
      <Position>42</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R43.htm</HtmlFileName>
      <LongName>9955529 - Disclosure - Summary of Significant Accounting Policies (Goodwill by Reporting Segment) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesGoodwillbyReportingSegmentDetails</Role>
      <ShortName>Summary of Significant Accounting Policies (Goodwill by Reporting Segment) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesTables</ParentRole>
      <Position>43</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R44.htm</HtmlFileName>
      <LongName>9955530 - Disclosure - Summary of Significant Accounting Policies (Intangible Assets) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesIntangibleAssetsDetails</Role>
      <ShortName>Summary of Significant Accounting Policies (Intangible Assets) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesTables</ParentRole>
      <Position>44</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R45.htm</HtmlFileName>
      <LongName>9955531 - Disclosure - Summary of Significant Accounting Policies (Components of Other Assets) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesComponentsofOtherAssetsDetails</Role>
      <ShortName>Summary of Significant Accounting Policies (Components of Other Assets) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesTables</ParentRole>
      <Position>45</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R46.htm</HtmlFileName>
      <LongName>9955532 - Disclosure - Summary of Significant Accounting Policies (Components of Other Current Liabilities) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesComponentsofOtherCurrentLiabilitiesDetails</Role>
      <ShortName>Summary of Significant Accounting Policies (Components of Other Current Liabilities) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesTables</ParentRole>
      <Position>46</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R47.htm</HtmlFileName>
      <LongName>9955533 - Disclosure - Summary of Significant Accounting Policies (Accrued Warranty Liability Activity) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesAccruedWarrantyLiabilityActivityDetails</Role>
      <ShortName>Summary of Significant Accounting Policies (Accrued Warranty Liability Activity) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesTables</ParentRole>
      <Position>47</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R48.htm</HtmlFileName>
      <LongName>9955534 - Disclosure - Summary of Significant Accounting Policies (Fair Market Value and Classification of Derivative Instruments) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesFairMarketValueandClassificationofDerivativeInstrumentsDetails</Role>
      <ShortName>Summary of Significant Accounting Policies (Fair Market Value and Classification of Derivative Instruments) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/SummaryofSignificantAccountingPoliciesTables</ParentRole>
      <Position>48</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R49.htm</HtmlFileName>
      <LongName>9955535 - Disclosure - Segment Information (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/SegmentInformationNarrativeDetails</Role>
      <ShortName>Segment Information (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/SegmentInformationTables</ParentRole>
      <Position>49</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R50.htm</HtmlFileName>
      <LongName>9955536 - Disclosure - Segment Information (Operations and Assets) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/SegmentInformationOperationsandAssetsDetails</Role>
      <ShortName>Segment Information (Operations and Assets) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/SegmentInformationTables</ParentRole>
      <Position>50</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R51.htm</HtmlFileName>
      <LongName>9955537 - Disclosure - Segment Information (Geographic Information) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/SegmentInformationGeographicInformationDetails</Role>
      <ShortName>Segment Information (Geographic Information) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/SegmentInformationTables</ParentRole>
      <Position>51</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R52.htm</HtmlFileName>
      <LongName>9955538 - Disclosure - Inventories (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/InventoriesDetails</Role>
      <ShortName>Inventories (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/InventoriesTables</ParentRole>
      <Position>52</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R53.htm</HtmlFileName>
      <LongName>9955539 - Disclosure - Inventories (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/InventoriesNarrativeDetails</Role>
      <ShortName>Inventories (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/InventoriesTables</ParentRole>
      <Position>53</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R54.htm</HtmlFileName>
      <LongName>9955540 - Disclosure - Property, Plant and Equipment (PPE By Type) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/PropertyPlantandEquipmentPPEByTypeDetails</Role>
      <ShortName>Property, Plant and Equipment (PPE By Type) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/PropertyPlantandEquipmentTables</ParentRole>
      <Position>54</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R55.htm</HtmlFileName>
      <LongName>9955541 - Disclosure - Property, Plant and Equipment (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/PropertyPlantandEquipmentNarrativeDetails</Role>
      <ShortName>Property, Plant and Equipment (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/PropertyPlantandEquipmentTables</ParentRole>
      <Position>55</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R56.htm</HtmlFileName>
      <LongName>9955542 - Disclosure - Income Taxes (Income before Income Tax Expense) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/IncomeTaxesIncomebeforeIncomeTaxExpenseDetails</Role>
      <ShortName>Income Taxes (Income before Income Tax Expense) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/IncomeTaxesTables</ParentRole>
      <Position>56</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R57.htm</HtmlFileName>
      <LongName>9955543 - Disclosure - Income Taxes (Components of Income Tax Expense) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/IncomeTaxesComponentsofIncomeTaxExpenseDetails</Role>
      <ShortName>Income Taxes (Components of Income Tax Expense) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/IncomeTaxesTables</ParentRole>
      <Position>57</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R58.htm</HtmlFileName>
      <LongName>9955544 - Disclosure - Income Taxes (Income Taxes Paid) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/IncomeTaxesIncomeTaxesPaidDetails</Role>
      <ShortName>Income Taxes (Income Taxes Paid) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/IncomeTaxesTables</ParentRole>
      <Position>58</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R59.htm</HtmlFileName>
      <LongName>9955545 - Disclosure - Income Taxes (Effective Income Tax Rate Reconciliation) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/IncomeTaxesEffectiveIncomeTaxRateReconciliationDetails</Role>
      <ShortName>Income Taxes (Effective Income Tax Rate Reconciliation) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/IncomeTaxesTables</ParentRole>
      <Position>59</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R60.htm</HtmlFileName>
      <LongName>9955546 - Disclosure - Income Taxes (Schedule of Deferred Income Taxes) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/IncomeTaxesScheduleofDeferredIncomeTaxesDetails</Role>
      <ShortName>Income Taxes (Schedule of Deferred Income Taxes) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/IncomeTaxesTables</ParentRole>
      <Position>60</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R61.htm</HtmlFileName>
      <LongName>9955547 - Disclosure - Income Taxes (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/IncomeTaxesNarrativeDetails</Role>
      <ShortName>Income Taxes (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/IncomeTaxesTables</ParentRole>
      <Position>61</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R62.htm</HtmlFileName>
      <LongName>9955548 - Disclosure - Debt (Schedule of Debt Instruments) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/DebtScheduleofDebtInstrumentsDetails</Role>
      <ShortName>Debt (Schedule of Debt Instruments) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/DebtTables</ParentRole>
      <Position>62</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R63.htm</HtmlFileName>
      <LongName>9955549 - Disclosure - Debt (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/DebtNarrativeDetails</Role>
      <ShortName>Debt (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/DebtTables</ParentRole>
      <Position>63</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R64.htm</HtmlFileName>
      <LongName>9955550 - Disclosure - Debt (Annual Maturities of Debt) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/DebtAnnualMaturitiesofDebtDetails</Role>
      <ShortName>Debt (Annual Maturities of Debt) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/DebtTables</ParentRole>
      <Position>64</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R65.htm</HtmlFileName>
      <LongName>9955551 - Disclosure - Shareholders' Equity (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/ShareholdersEquityNarrativeDetails</Role>
      <ShortName>Shareholders' Equity (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/ShareholdersEquityTables</ParentRole>
      <Position>65</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R66.htm</HtmlFileName>
      <LongName>9955552 - Disclosure - Shareholders' Equity (AOCI and Reclassification) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/ShareholdersEquityAOCIandReclassificationDetails</Role>
      <ShortName>Shareholders' Equity (AOCI and Reclassification) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/ShareholdersEquityTables</ParentRole>
      <Position>66</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R67.htm</HtmlFileName>
      <LongName>9955553 - Disclosure - Share-Based Awards, Purchase Plans and Compensation Cost (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/ShareBasedAwardsPurchasePlansandCompensationCostNarrativeDetails</Role>
      <ShortName>Share-Based Awards, Purchase Plans and Compensation Cost (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/ShareBasedAwardsPurchasePlansandCompensationCostTables</ParentRole>
      <Position>67</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R68.htm</HtmlFileName>
      <LongName>9955554 - Disclosure - Share-Based Awards, Purchase Plans and Compensation Cost (Option Activity and Outstanding) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/ShareBasedAwardsPurchasePlansandCompensationCostOptionActivityandOutstandingDetails</Role>
      <ShortName>Share-Based Awards, Purchase Plans and Compensation Cost (Option Activity and Outstanding) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/ShareBasedAwardsPurchasePlansandCompensationCostTables</ParentRole>
      <Position>68</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R69.htm</HtmlFileName>
      <LongName>9955555 - Disclosure - Share-Based Awards, Purchase Plans and Compensation Cost (Options Outstanding and Exercisable By Price) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/ShareBasedAwardsPurchasePlansandCompensationCostOptionsOutstandingandExercisableByPriceDetails</Role>
      <ShortName>Share-Based Awards, Purchase Plans and Compensation Cost (Options Outstanding and Exercisable By Price) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/ShareBasedAwardsPurchasePlansandCompensationCostTables</ParentRole>
      <Position>69</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R70.htm</HtmlFileName>
      <LongName>9955556 - Disclosure - Share-Based Awards, Purchase Plans and Compensation Cost (Options Exercised) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/ShareBasedAwardsPurchasePlansandCompensationCostOptionsExercisedDetails</Role>
      <ShortName>Share-Based Awards, Purchase Plans and Compensation Cost (Options Exercised) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/ShareBasedAwardsPurchasePlansandCompensationCostTables</ParentRole>
      <Position>70</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R71.htm</HtmlFileName>
      <LongName>9955557 - Disclosure - Share-Based Awards, Purchase Plans and Compensation Cost (Authorized Shares) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/ShareBasedAwardsPurchasePlansandCompensationCostAuthorizedSharesDetails</Role>
      <ShortName>Share-Based Awards, Purchase Plans and Compensation Cost (Authorized Shares) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/ShareBasedAwardsPurchasePlansandCompensationCostTables</ParentRole>
      <Position>71</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R72.htm</HtmlFileName>
      <LongName>9955558 - Disclosure - Share-Based Awards, Purchase Plans and Compensation Cost (Share Based Compensation Expense) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/ShareBasedAwardsPurchasePlansandCompensationCostShareBasedCompensationExpenseDetails</Role>
      <ShortName>Share-Based Awards, Purchase Plans and Compensation Cost (Share Based Compensation Expense) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/ShareBasedAwardsPurchasePlansandCompensationCostTables</ParentRole>
      <Position>72</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R73.htm</HtmlFileName>
      <LongName>9955559 - Disclosure - Share-Based Awards, Purchase Plans and Compensation Cost (Valuation Assumptions Options) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/ShareBasedAwardsPurchasePlansandCompensationCostValuationAssumptionsOptionsDetails</Role>
      <ShortName>Share-Based Awards, Purchase Plans and Compensation Cost (Valuation Assumptions Options) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/ShareBasedAwardsPurchasePlansandCompensationCostTables</ParentRole>
      <Position>73</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R74.htm</HtmlFileName>
      <LongName>9955560 - Disclosure - Share-Based Awards, Purchase Plans and Compensation Cost (Valuation Assumptions ESPP) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/ShareBasedAwardsPurchasePlansandCompensationCostValuationAssumptionsESPPDetails</Role>
      <ShortName>Share-Based Awards, Purchase Plans and Compensation Cost (Valuation Assumptions ESPP) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/ShareBasedAwardsPurchasePlansandCompensationCostTables</ParentRole>
      <Position>74</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R75.htm</HtmlFileName>
      <LongName>9955561 - Disclosure - Earnings per Share (Schedule Of Earnings Per Share Basic and Diluted) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/EarningsperShareScheduleOfEarningsPerShareBasicandDilutedDetails</Role>
      <ShortName>Earnings per Share (Schedule Of Earnings Per Share Basic and Diluted) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/EarningsperShareTables</ParentRole>
      <Position>75</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R76.htm</HtmlFileName>
      <LongName>9955562 - Disclosure - Earnings per Share (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/EarningsperShareNarrativeDetails</Role>
      <ShortName>Earnings per Share (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/EarningsperShareTables</ParentRole>
      <Position>76</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R77.htm</HtmlFileName>
      <LongName>9955563 - Disclosure - Retirement Benefits (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/RetirementBenefitsNarrativeDetails</Role>
      <ShortName>Retirement Benefits (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/RetirementBenefitsTables</ParentRole>
      <Position>77</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R78.htm</HtmlFileName>
      <LongName>9955564 - Disclosure - Retirement Benefits (Plan Assets by Category and Fair Value Measurement Level) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/RetirementBenefitsPlanAssetsbyCategoryandFairValueMeasurementLevelDetails</Role>
      <ShortName>Retirement Benefits (Plan Assets by Category and Fair Value Measurement Level) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/RetirementBenefitsTables</ParentRole>
      <Position>78</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R79.htm</HtmlFileName>
      <LongName>9955565 - Disclosure - Retirement Benefits Retirement Benefits (Level 3 Asset Rollforward) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/RetirementBenefitsRetirementBenefitsLevel3AssetRollforwardDetails</Role>
      <ShortName>Retirement Benefits Retirement Benefits (Level 3 Asset Rollforward) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>79</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R80.htm</HtmlFileName>
      <LongName>9955566 - Disclosure - Retirement Benefits (Funded Status) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/RetirementBenefitsFundedStatusDetails</Role>
      <ShortName>Retirement Benefits (Funded Status) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/RetirementBenefitsTables</ParentRole>
      <Position>80</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R81.htm</HtmlFileName>
      <LongName>9955567 - Disclosure - Retirement Benefits (Amounts Recognized in Balance Sheets) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/RetirementBenefitsAmountsRecognizedinBalanceSheetsDetails</Role>
      <ShortName>Retirement Benefits (Amounts Recognized in Balance Sheets) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/RetirementBenefitsTables</ParentRole>
      <Position>81</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R82.htm</HtmlFileName>
      <LongName>9955568 - Disclosure - Retirement Benefits (Accumulated Benefit Obligation in Excess of Plan Assets) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/RetirementBenefitsAccumulatedBenefitObligationinExcessofPlanAssetsDetails</Role>
      <ShortName>Retirement Benefits (Accumulated Benefit Obligation in Excess of Plan Assets) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/RetirementBenefitsTables</ParentRole>
      <Position>82</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R83.htm</HtmlFileName>
      <LongName>9955569 - Disclosure - Retirement Benefits (Components of Net Periodic Benefit Cost) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/RetirementBenefitsComponentsofNetPeriodicBenefitCostDetails</Role>
      <ShortName>Retirement Benefits (Components of Net Periodic Benefit Cost) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/RetirementBenefitsTables</ParentRole>
      <Position>83</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R84.htm</HtmlFileName>
      <LongName>9955570 - Disclosure - Retirement Benefits (Amounts recognized in other comprehensive (income) loss) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/RetirementBenefitsAmountsrecognizedinothercomprehensiveincomelossDetails</Role>
      <ShortName>Retirement Benefits (Amounts recognized in other comprehensive (income) loss) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/RetirementBenefitsTables</ParentRole>
      <Position>84</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R85.htm</HtmlFileName>
      <LongName>9955571 - Disclosure - Retirement Benefits (Amounts included in accumulated other comprehensive (income) loss) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/RetirementBenefitsAmountsincludedinaccumulatedothercomprehensiveincomelossDetails</Role>
      <ShortName>Retirement Benefits (Amounts included in accumulated other comprehensive (income) loss) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/RetirementBenefitsTables</ParentRole>
      <Position>85</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R86.htm</HtmlFileName>
      <LongName>9955572 - Disclosure - Retirement Benefits (Assumptions used to determine obligations and cost) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/RetirementBenefitsAssumptionsusedtodetermineobligationsandcostDetails</Role>
      <ShortName>Retirement Benefits (Assumptions used to determine obligations and cost) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/RetirementBenefitsTables</ParentRole>
      <Position>86</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R87.htm</HtmlFileName>
      <LongName>9955573 - Disclosure - Retirement Benefits (Estimated future benefit payments) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/RetirementBenefitsEstimatedfuturebenefitpaymentsDetails</Role>
      <ShortName>Retirement Benefits (Estimated future benefit payments) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/RetirementBenefitsTables</ParentRole>
      <Position>87</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R88.htm</HtmlFileName>
      <LongName>9955574 - Disclosure - Commitments and Contingencies (Lease Commitments) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/CommitmentsandContingenciesLeaseCommitmentsDetails</Role>
      <ShortName>Commitments and Contingencies (Lease Commitments) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/CommitmentsandContingenciesTables</ParentRole>
      <Position>88</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R89.htm</HtmlFileName>
      <LongName>9955575 - Disclosure - Commitments and Contingencies (Narrative) (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/CommitmentsandContingenciesNarrativeDetails</Role>
      <ShortName>Commitments and Contingencies (Narrative) (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <ParentRole>http://www.graco.com/role/CommitmentsandContingenciesTables</ParentRole>
      <Position>89</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R90.htm</HtmlFileName>
      <LongName>9955576 - Disclosure - Acquisitions - Narrative (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/AcquisitionsNarrativeDetails</Role>
      <ShortName>Acquisitions - Narrative (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>90</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R91.htm</HtmlFileName>
      <LongName>9955577 - Disclosure - Acquisitions - Schedule of Business Acquisitions, by Acquisition (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/AcquisitionsScheduleofBusinessAcquisitionsbyAcquisitionDetails</Role>
      <ShortName>Acquisitions - Schedule of Business Acquisitions, by Acquisition (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>91</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R92.htm</HtmlFileName>
      <LongName>9955578 - Disclosure - Acquisitions - Schedule of Finite-Lived Intangible Assets Acquired as Part of Business Combination (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/AcquisitionsScheduleofFiniteLivedIntangibleAssetsAcquiredasPartofBusinessCombinationDetails</Role>
      <ShortName>Acquisitions - Schedule of Finite-Lived Intangible Assets Acquired as Part of Business Combination (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>92</Position>
    </Report>
    <Report instance="ggg-20251226.htm">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R93.htm</HtmlFileName>
      <LongName>9955579 - Disclosure - Acquisitions - Pro Forma Information (Details)</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.graco.com/role/AcquisitionsProFormaInformationDetails</Role>
      <ShortName>Acquisitions - Pro Forma Information (Details)</ShortName>
      <MenuCategory>Details</MenuCategory>
      <Position>93</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="ggg-20251226.htm">ggg-20251226.htm</File>
    <File>ggg-20251226.xsd</File>
    <File>ggg-20251226_cal.xml</File>
    <File>ggg-20251226_def.xml</File>
    <File>ggg-20251226_lab.xml</File>
    <File>ggg-20251226_pre.xml</File>
  </InputFiles>
  <SupplementalFiles>
    <File>ggg-20251226_g1.jpg</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy items="1405">http://fasb.org/us-gaap/2025</BaseTaxonomy>
    <BaseTaxonomy items="15">http://xbrl.sec.gov/cyd/2025</BaseTaxonomy>
    <BaseTaxonomy items="39">http://xbrl.sec.gov/dei/2025</BaseTaxonomy>
    <BaseTaxonomy items="5">http://xbrl.sec.gov/ecd/2025</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
