<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2019-01-31"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="ufpi-20200722.xsd" xlink:type="simple"/>
    <context id="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000912767</identifier>
        </entity>
        <period>
            <startDate>2020-07-22</startDate>
            <endDate>2020-07-22</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A"
      id="Tc_bXWerFqKH0yg3iI5i8s2sA_2_1">0000912767</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A"
      id="Tc_1QDe65rUCE2ozSl6EH-a8w_3_1">false</dei:AmendmentFlag>
    <dei:DocumentType
      contextRef="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A"
      id="Narr_OHjSpggh_USF_syExhsLMA">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A"
      id="Narr_lWk4L1gRs0aDT_8siaDccg">2020-07-22</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A"
      id="Narr_CiFnFbHBbEKg_YmdV3HPuA">UFP INDUSTRIES, INC.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A"
      id="Narr_Zrq6hnmevUWX1BfVRa8H1w">MI</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A"
      id="Narr_Hw-8f__ERkKlmqMbQ_k9pg">0-22684</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A"
      id="Narr_BloiXT2hZkmx-KPxcmOf-w">38-1465835</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A"
      id="Narr_mqQ1YTlvbE6JKu8n4BbG6Q">2801 East Beltline, NE</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A"
      id="Narr_N3vmkj7ydE-dzJiYfctwhQ">Grand Rapids</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A"
      id="Narr_9385VDoV30KL82pbL8BB0A">MI</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A"
      id="Narr_hYsCabHKqUe51rxm5OfOQw">49525</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A"
      id="Narr_QWJ7SiGSk0uVDyDEkOEFxA">616</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A"
      id="Narr_u4ZhV4LSQUKCUhQIMOyf_A">364-6161</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A"
      id="Narr_2hrcaACaZUmdPmzzDSm8sg">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A"
      id="Narr_t-mdZj2rxk2de2a7aZkrWw">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A"
      id="Narr_OHMfYRdXG0GbiIlIZqedGQ">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A"
      id="Narr_QzepIzp620qC0Lw7_7crAw">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A"
      id="Tc_kO8husQ7OU-2t6L_7qObvQ_2_0">Common Stock</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A"
      id="Tc_Z0jMyjkSR0isGg6MsAKrlQ_2_1">UFPI</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A"
      id="Narr_VjaffqkIcU-QnozwKT_aaw">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_7_22_2020_To_7_22_2020_2FCSnDVRwESeV953Qm8w4A"
      id="Narr_lFIkxlNlu06w8HymDJKPnQ">false</dei:EntityEmergingGrowthCompany>
</xbrl>
