<?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-20260428.xsd" xlink:type="simple"/>
    <context id="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000912767</identifier>
        </entity>
        <period>
            <startDate>2026-04-28</startDate>
            <endDate>2026-04-28</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg"
      id="Tc_Dfb0iItZvkuagzzPflK6nw_2_1">0000912767</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg"
      id="Tc_1saR21buPUSAB80zdH9q4w_3_1">false</dei:AmendmentFlag>
    <dei:DocumentType
      contextRef="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg"
      id="Narr_gTL2eGVXikeBugTkDs4f4A">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg"
      id="Narr_yEZzcLfb-UKa_lyHFcDYgA">2026-04-28</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg"
      id="Narr_H_WIFy87pkiVy7J2rHGISQ">UFP INDUSTRIES, INC.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg"
      id="Narr__RfVL0RPHUSJV97JlopoRg">MI</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg"
      id="Narr_sIC28ZYaWU2tjfeD_8tDlw">0-22684</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg"
      id="Narr_Ce_ckowHAEevXt4jTy1nwg">38-1465835</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg"
      id="Narr_dmoLh89nJ0mwdrApNT5fOA">2801 East Beltline, NE </dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg"
      id="Narr_DAoXZv9_LUmJpJUnLGJvkQ">Grand Rapids</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg"
      id="Narr_0gHXfgEHMEG8nJ9BDxQcQA">MI</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg"
      id="Narr_Z5e0FhXgTU6K6n18XZUErw">49525</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg"
      id="Narr_LPy5x7irCk66BfiIxEYhzQ">616</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg"
      id="Narr_1GyVPPhFaEe6t-vYwXEVmQ">364-6161</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg"
      id="Narr_-j99zJVEzUmeYa94Xtgf1A">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg"
      id="Narr_knkZeZGjY0OpZ10EJLE6Bg">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg"
      id="Narr_-zNVNN_uuUeT2NqNf0mPgA">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg"
      id="Narr_V9NCXRul_EmdIhbnh5P5vw">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg"
      id="Tc_QvuOSFCqFUG_nAP7g69OzA_2_0">Common Stock</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg"
      id="Tc_ckN2eRDA3EmEgajkHfGAEA_2_1">UFPI</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg"
      id="Narr_tKz61Kn0Rki1Xlh0bMpNAw">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_4_28_2026_To_4_28_2026_gFu8ecwptkmVebSSnMNDbg"
      id="Narr_OXIbAv_6A0WpqBBG-1BBMw">false</dei:EntityEmergingGrowthCompany>
</xbrl>
