<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2025"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="ufpi-20250728.xsd" xlink:type="simple"/>
    <context id="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000912767</identifier>
        </entity>
        <period>
            <startDate>2025-07-28</startDate>
            <endDate>2025-07-28</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA"
      id="Tc_CqVycgald0CfGvnJBCEVLw_2_1">0000912767</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA"
      id="Tc_k0VFEwttg0mGSIPIcCsjgw_3_1">false</dei:AmendmentFlag>
    <dei:DocumentType
      contextRef="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA"
      id="Narr_-pic2rZnPEyFgN1Y5elH2A">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA"
      id="Narr_UQXY6O5shUmqc8bCzYj5LQ">2025-07-28</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA"
      id="Narr_-mtUqfA_s0ud3Y_gPu4bgA">UFP INDUSTRIES, INC.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA"
      id="Narr_tc258ZxbzUapz6i_nGsZWQ">MI</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA"
      id="Narr_VsWaaFFCvUmsu5QT3mvFew">0-22684</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA"
      id="Narr_FG_-A0Oq8keqpaUy3DlVGA">38-1465835</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA"
      id="Narr_gMvzm_9WLEy3D8-UAUP_vg">2801 East Beltline, NE </dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA"
      id="Narr_ZoEx2kWiwUejctxAAYOdRQ">Grand Rapids</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA"
      id="Narr_kQ433Lkz4kKF4KDavlVRdA">MI</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA"
      id="Narr_jkFtGz1Q-0GW5scKFGNzAg">49525</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA"
      id="Narr_rtA0SnaUgECEg95GBuK1kg">616</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA"
      id="Narr_UcBWrN68JE2IPipRh2IMUA">364-6161</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA"
      id="Narr_02Yk7YWDKEq52JTceAHRcg">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA"
      id="Narr_9Be3ZRjnKkCq7ddvDlDfvQ">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA"
      id="Narr_dC1WgMs1ikKc3NO59j2pAA">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA"
      id="Narr_mHmA6h9kmE2oagszjiXLEA">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA"
      id="Tc_efxmW0CDBECaHl0p0crcJw_2_0">Common Stock</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA"
      id="Tc_U5R7-PqW0E6l6aDls-GXbw_2_1">UFPI</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA"
      id="Narr_CJ6eimhDLE68txyOhuY7Dw">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_7_28_2025_To_7_28_2025_BJ4hGxlqFUWBiomTBXQsEA"
      id="Narr_MbUjDPcf9kiwJyjpUSb6FA">false</dei:EntityEmergingGrowthCompany>
</xbrl>
