<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2026"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="ufpi-20260730.xsd" xlink:type="simple"/>
    <context id="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000912767</identifier>
        </entity>
        <period>
            <startDate>2026-07-30</startDate>
            <endDate>2026-07-30</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q"
      id="Tc_TslwveU3b0GFH9gNRD2KdQ_2_1">0000912767</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q"
      id="Tc_cyfhZksxSk-ILU1TD3Xe9Q_3_1">false</dei:AmendmentFlag>
    <dei:DocumentType
      contextRef="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q"
      id="Narr_ZhV4gOphYEiGhM4gKzKAEQ">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q"
      id="Narr_jvUpq40EGUiAkHg6OEBnkA">2026-07-30</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q"
      id="Narr_neB5jaLKv0u2ZSNpXkQ9FA">UFP INDUSTRIES, INC.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q"
      id="Narr_eosYpGI4cU2QMoOuc4Zw6g">MI</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q"
      id="Narr_sMy6XrpFwUOQPHaejWDKBw">0-22684</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q"
      id="Narr_viTqBe3rFE6GZMbDB0QFcg">38-1465835</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q"
      id="Narr_1Xh5rhFXzU2c08Jmbwmb3g">2801 East Beltline, NE</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q"
      id="Narr_CMyD31o1-0uqggzooLqWfg">Grand Rapids</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q"
      id="Narr_sFNRHf_2J0y0yq7aksSvZA">MI</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q"
      id="Narr_vNIoESgnZ0iWGYrOjwpMaQ">49525</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q"
      id="Narr_1fuT9ps5PkGDuHql7VbwZA">616</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q"
      id="Narr_6PBB4JqVbk6Mp9YqAh2ZVQ">364-6161</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q"
      id="Narr_RiodHDAEkEm2-4viiYYm1w">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q"
      id="Narr_vmlDfXvxikew5aKh8Fh6kA">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q"
      id="Narr_SUov3WoZtUaTQqULztHFXw">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q"
      id="Narr_uIRAwtrYtkGyytxIucWKTw">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q"
      id="Tc_HmUqyiLnJUSW-lDXEmBdKw_2_0">Common Stock</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q"
      id="Tc_GsVzDPqDC0m_XgsopMAGiA_2_1">UFPI</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q"
      id="Narr__OHzljgIjEGcaPJDqpq55A">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_7_30_2026_To_7_30_2026_sCM9l6yfpkewsjgP79uL0Q"
      id="Narr_LQ6vfoXqbkyw6lu00N_qmA">false</dei:EntityEmergingGrowthCompany>
</xbrl>
