<XML>
<?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-20191023.xsd" xlink:type="simple"/>
    <context id="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0000912767</identifier>
        </entity>
        <period>
            <startDate>2019-10-23</startDate>
            <endDate>2019-10-23</endDate>
        </period>
    </context>
    <dei:EntityCentralIndexKey
      contextRef="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw"
      id="Hidden_o9-yR6ZyOkOh0L5R7J0m7g">0000912767</dei:EntityCentralIndexKey>
    <dei:AmendmentFlag
      contextRef="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw"
      id="Hidden_A2zXOF-e7kyWN2hJNIbHsw">false</dei:AmendmentFlag>
    <dei:DocumentType
      contextRef="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw"
      id="Narr_emlpKTK3rEOwuyejaEmu0A">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate
      contextRef="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw"
      id="Narr_zBum7frI3UW9sFDZjjvMvQ">2019-10-23</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName
      contextRef="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw"
      id="Narr_6qXysn3h4U-_P20Xu9LOfg">Universal Forest Products, Inc.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode
      contextRef="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw"
      id="Narr_oJu3go_oNUa9wQ_Ozo32rQ">MI</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber
      contextRef="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw"
      id="Narr_zvqswqFTjUe-FwodVTZJ1Q">0-22684</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber
      contextRef="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw"
      id="Narr_zfgfqvy3Ik64l6mpWizYIg">38-1465835</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1
      contextRef="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw"
      id="Narr_9bD2yvWAzEmcOtQ_E__UaQ">2801 East Beltline, NE</dei:EntityAddressAddressLine1>
    <dei:EntityAddressCityOrTown
      contextRef="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw"
      id="Narr_D_CuNCyCPECpIJWTeq-Ojw">Grand Rapids</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince
      contextRef="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw"
      id="Narr_rQhRhECwLUaQ0njOfwrjcA">MI</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode
      contextRef="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw"
      id="Narr_83MH08MSDk-KCU8D9OhmEQ">49525</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode
      contextRef="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw"
      id="Narr_b1II9A-bQkukkszQzgqDng">616</dei:CityAreaCode>
    <dei:LocalPhoneNumber
      contextRef="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw"
      id="Narr_hJqAoj_VVkqOIsZgpVnhmw">364-6161</dei:LocalPhoneNumber>
    <dei:WrittenCommunications
      contextRef="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw"
      id="Narr_tT6_BteMt0mUsQdiAv8VIg">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial
      contextRef="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw"
      id="Narr_KNBD5G4GOEGysaXNTFZMgQ">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer
      contextRef="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw"
      id="Narr_Wr3awFNCcUqIMuYzjzCeOQ">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer
      contextRef="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw"
      id="Narr_umMps3JKskGQwBRvHi3eQA">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle
      contextRef="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw"
      id="Tc_ASXqEzPvBEyLkptoE58euQ_2_0">Common Stock</dei:Security12bTitle>
    <dei:TradingSymbol
      contextRef="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw"
      id="Tc_HlU4qyd0sEGlQy13MC48Tw_2_1">UFPI</dei:TradingSymbol>
    <dei:SecurityExchangeName
      contextRef="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw"
      id="Narr_rAOM2Omx1kGz_JIHvapL-g">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany
      contextRef="Duration_10_23_2019_To_10_23_2019_lhFkB36DHUuqaC6E0rT4Vw"
      id="Narr_bm_KuWN1YUaXwFcVER3fOQ">false</dei:EntityEmergingGrowthCompany>
</xbrl>
</XML>
