<?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-20201209.xsd" xlink:type="simple"/>
    <context id="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000912767</identifier>
        </entity>
        <period>
            <startDate>2020-11-16</startDate>
            <endDate>2020-11-16</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A"
      id="Tc_XE4sUOtaFEqs9qvxHLkx-Q_2_1">0000912767</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A"
      id="Tc_AGZzEwuR1UeIBBjaWMWwgA_3_1">false</dei:AmendmentFlag>
    <dei:DocumentType
      contextRef="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A"
      id="Narr_oD2mQtYxbkumi9_gND4QLw">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A"
      id="Narr_fWSt1L3jfEuICb97oaZeUQ">2020-12-09</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A"
      id="Narr_UYvkRKV1a0ms7CAnnIBruQ">UFP INDUSTRIES, INC.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A"
      id="Narr_N9IWuSSJmkykf6cgb8EJtw">MI</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A"
      id="Narr_G2RieSOIYE2p8Y3zxIFfpw">0-22684</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A"
      id="Narr_xBXh1HW-mEmDKWUBmirU7w">38-1465835</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A"
      id="Narr_d3pPv0cHGUGNEJmC3hpdZA">2801 East Beltline, NE, Grand Rapids</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A"
      id="Narr_zI6JsdSi_0iJlzs5IPunng">, </dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A"
      id="Narr_Fk1GrDsH_UeLedSUeNfM7g">MI</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A"
      id="Narr_1grgxxkWQUGDTfdqZqCW0w">49525</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A"
      id="Narr_IIEYPCZlZk2m6PcXh7AcxQ">616</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A"
      id="Narr_VxNkU8QXIEWdfcT6UY8ehw">364-6161</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A"
      id="Narr_jGxD887pVEuFGDS7UGMOdQ">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A"
      id="Narr_P6Dqpd4GAkeSDFcUXbNi5A">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A"
      id="Narr_eBqkAdi_YUyQJRI2KHoyvA">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A"
      id="Narr_rRTyistPK0i4EliWQtfw0w">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A"
      id="Tc_Q071RWeqh0qyQQgAzzVTaQ_2_0">Common Stock</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A"
      id="Tc_BDN2Gde81k6nZ1g1UC2cRw_2_1">UFPI</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A"
      id="Narr_4yAPb90VPUqMmdN7y73NFg">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_11_16_2020_To_11_16_2020_JTd0A0owcU-jvLv3xDpX0A"
      id="Narr_Hni1wS10wUOp_l-WRMilxQ">false</dei:EntityEmergingGrowthCompany>
</xbrl>
