<?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-20260504.xsd" xlink:type="simple"/>
    <context id="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000912767</identifier>
        </entity>
        <period>
            <startDate>2026-05-04</startDate>
            <endDate>2026-05-04</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ"
      id="Tc_5PVN2GNJqk6uonXHJ1bznw_2_1">0000912767</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ"
      id="Tc_pBe9fLJsl0Wf-gjYEAL71g_3_1">false</dei:AmendmentFlag>
    <dei:DocumentType
      contextRef="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ"
      id="Narr_VDBkfvblCUCnXzSYM_Ej7Q">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ"
      id="Narr_iF2xKozjBE2eQIoqEP4bqA">2026-05-04</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ"
      id="Narr__xqf70YU7UWPJv7NJZdiUw">UFP INDUSTRIES, INC.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ"
      id="Narr_eD21hjvVWEW-e72N9whrDQ">MI</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ"
      id="Narr_ZTciM4iTh0KC58AoEwW6BQ">0-22684</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ"
      id="Narr_4m5YCJ7IzUGEzB3IrfYc0g">38-1465835</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ"
      id="Narr_U-9THvk4zE-Ek1PuKgvP1A">2801 East Beltline, NE </dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ"
      id="Narr_8vnx74Sfsk2_tg_2Yo9sMA">Grand Rapids</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ"
      id="Narr_n-pIdzsclEiy7CNy75UWEw">MI</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ"
      id="Narr_QUtRasj25U-Pyx7dHAONug">49525</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ"
      id="Narr_0ivcURiZ2EGqvrHU9cF3PA">616</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ"
      id="Narr_btaoLEjgr0iyOP6mvIY1Zw">364-6161</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ"
      id="Narr_Jfpktn3Wzk2MyUo7OHk-6w">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ"
      id="Narr_qWnCpsqOSEiwlPrtB8JinQ">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ"
      id="Narr_8MUJOQnkgkuNvi5CDy0WhA">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ"
      id="Narr_t-aZMoOELUawBm59bRiQvw">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ"
      id="Tc_NGdTrp7lb0Wn1amOLDxy9Q_2_0">Common Stock</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ"
      id="Tc_38-pCwRT6k2yUjvWxyaeTw_2_1">UFPI</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ"
      id="Narr_Tyq8ZPM1OEmHAGXuzljktg">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_5_4_2026_To_5_4_2026_XWM54_SYUU-zHyOCYU-YkQ"
      id="Narr_oZJO3_RhF0yc7Exvcub6iA">false</dei:EntityEmergingGrowthCompany>
</xbrl>
