<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2024"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="ufpi-20250423.xsd" xlink:type="simple"/>
    <context id="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000912767</identifier>
        </entity>
        <period>
            <startDate>2025-04-23</startDate>
            <endDate>2025-04-23</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g"
      id="Tc_eea0WS48sEOXXACRV9-yKg_2_1">0000912767</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g"
      id="Tc_ZwK2ehVoqEiBQnxEZ9ON_Q_3_1">false</dei:AmendmentFlag>
    <dei:DocumentType
      contextRef="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g"
      id="Narr_iepqOY8w0Uu3R-3FlmWVjA">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g"
      id="Narr_2xwORtVnGkWrxohDzDwT0Q">2025-04-23</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g"
      id="Narr_PP0-bWDzZku-tAq_2RNhfQ">UFP INDUSTRIES, INC.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g"
      id="Narr_Zy1PeyZgf0-eNYpGBY5_Xw">MI</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g"
      id="Narr_sN7JuhemvU-8s8QeAu-GDQ">0-22684</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g"
      id="Narr_3tsHMZ4Ttk-MuEn0_qYVIQ">38-1465835</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g"
      id="Narr_HljC6ar3ZUSzzxE4RXo3lA">2801 East Beltline, NE</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g"
      id="Narr_2fj0VPBBBkSzLZWFyPp2Hg">Grand Rapids</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g"
      id="Narr_dRLC__LqzkGqeSAVhdtnCA">MI</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g"
      id="Narr_vWClNMsNq0Sds61_ZVb4sg">49525</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g"
      id="Narr_V-VdU2x750GEFE_nBAUN8A">616</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g"
      id="Narr_QFyWMDgOG0uIluERntD0xg">364-6161</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g"
      id="Narr_6OAXeOyulkCHx3hTfu_trQ">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g"
      id="Narr_pXnrDc7vAkapfW-hNcAJ_A">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g"
      id="Narr_TOkML0YME0e190aU9EHP2g">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g"
      id="Narr_J1TzWCO3mUurtLXgGllttA">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g"
      id="Tc_imwHElo3Pki9eutIJRmqOQ_2_0">Common Stock</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g"
      id="Tc_F-254p6DyE2Bi1u2G4rMFA_2_1">UFPI</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g"
      id="Narr_67OXD7MhSEC420pYhv-rDg">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_4_23_2025_To_4_23_2025_p3tJ80WFDkGuXeKTFxyp8g"
      id="Narr_EBSJ-II7PEaJWzXPTKPM_w">false</dei:EntityEmergingGrowthCompany>
</xbrl>
