<?xml version="1.0" encoding="UTF-8"?>

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2026 Workiva-->
<!--r:019e0856-780f-7907-8a2c-d7c7e81a65fe,g:5349f50c-892d-4794-848f-52cf71807045-->
<link:linkbase xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xbrldt="http://xbrl.org/2005/xbrldt" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/all" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#all"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#hypercube-dimension"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-default"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-domain"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/domain-member" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#domain-member"/>
  <link:roleRef roleURI="http://www.hersheys.com/role/DOCUMENTANDENTITYINFORMATION" xlink:type="simple" xlink:href="hsy-20260628.xsd#DOCUMENTANDENTITYINFORMATION"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/DOCUMENTANDENTITYINFORMATION" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_EntityInformationLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntitiesTable_019e0856-7a4d-7daa-aba6-da2db540e5b4" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_EntitiesTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_EntitiesTable_019e0856-7a4d-7daa-aba6-da2db540e5b4" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-79e5-ada5-e7e89e80661f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_dei_EntitiesTable_019e0856-7a4d-7daa-aba6-da2db540e5b4" xlink:to="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-79e5-ada5-e7e89e80661f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-79e5-ada5-e7e89e80661f_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-79e5-ada5-e7e89e80661f" xlink:to="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-79e5-ada5-e7e89e80661f_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7fa9-a528-a3e379accd46" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-79e5-ada5-e7e89e80661f" xlink:to="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7fa9-a528-a3e379accd46" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_019e0856-7a4d-79d4-a620-20b1d049103e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7fa9-a528-a3e379accd46" xlink:to="loc_us-gaap_CommonStockMember_019e0856-7a4d-79d4-a620-20b1d049103e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassBMember_019e0856-7a4d-7d9a-84a1-6c6b90b49663" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonClassBMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7fa9-a528-a3e379accd46" xlink:to="loc_us-gaap_CommonClassBMember_019e0856-7a4d-7d9a-84a1-6c6b90b49663" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentType_019e0856-7a4d-7e71-8be9-26c10b5cff60" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_DocumentType"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_DocumentType_019e0856-7a4d-7e71-8be9-26c10b5cff60" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentQuarterlyReport_019e0856-7a4d-71ac-be4b-9a87ce107c50" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_DocumentQuarterlyReport"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_DocumentQuarterlyReport_019e0856-7a4d-71ac-be4b-9a87ce107c50" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentPeriodEndDate_019e0856-7a4d-7507-8ed2-53c782c7b515" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_DocumentPeriodEndDate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_DocumentPeriodEndDate_019e0856-7a4d-7507-8ed2-53c782c7b515" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentTransitionReport_019e0856-7a4d-7d29-bdb9-a8c8791c459f" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_DocumentTransitionReport"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_DocumentTransitionReport_019e0856-7a4d-7d29-bdb9-a8c8791c459f" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityFileNumber_019e0856-7a4d-72e5-812f-2333780efc19" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_EntityFileNumber"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_EntityFileNumber_019e0856-7a4d-72e5-812f-2333780efc19" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityRegistrantName_019e0856-7a4d-7f7b-9401-5667a95f34b0" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_EntityRegistrantName"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_EntityRegistrantName_019e0856-7a4d-7f7b-9401-5667a95f34b0" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityIncorporationStateCountryCode_019e0856-7a4d-7a6a-a67f-fe6d9e438c08" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_EntityIncorporationStateCountryCode"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_EntityIncorporationStateCountryCode_019e0856-7a4d-7a6a-a67f-fe6d9e438c08" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityTaxIdentificationNumber_019e0856-7a4d-74f7-868e-803813099996" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_EntityTaxIdentificationNumber"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_EntityTaxIdentificationNumber_019e0856-7a4d-74f7-868e-803813099996" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityAddressAddressLine1_019e0856-7a4d-7db3-8f1d-479c6e62706f" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_EntityAddressAddressLine1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_EntityAddressAddressLine1_019e0856-7a4d-7db3-8f1d-479c6e62706f" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityAddressCityOrTown_019e0856-7a4d-7809-bb85-9278a5add30d" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_EntityAddressCityOrTown"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_EntityAddressCityOrTown_019e0856-7a4d-7809-bb85-9278a5add30d" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityAddressStateOrProvince_019e0856-7a4d-7290-9088-922ad438ba5a" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_EntityAddressStateOrProvince"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_EntityAddressStateOrProvince_019e0856-7a4d-7290-9088-922ad438ba5a" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityAddressPostalZipCode_019e0856-7a4d-7af4-8e92-64fb97eee1b5" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_EntityAddressPostalZipCode"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_EntityAddressPostalZipCode_019e0856-7a4d-7af4-8e92-64fb97eee1b5" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_CityAreaCode_019e0856-7a4d-7ea6-b99c-f219be950885" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_CityAreaCode"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_CityAreaCode_019e0856-7a4d-7ea6-b99c-f219be950885" xlink:type="arc" order="12"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_LocalPhoneNumber_019e0856-7a4d-7f89-8841-04b59bc6edc5" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_LocalPhoneNumber"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_LocalPhoneNumber_019e0856-7a4d-7f89-8841-04b59bc6edc5" xlink:type="arc" order="13"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_Security12bTitle_019e0856-7a4d-7a33-bc4e-07f12bf088bc" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_Security12bTitle"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_Security12bTitle_019e0856-7a4d-7a33-bc4e-07f12bf088bc" xlink:type="arc" order="14"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_TradingSymbol_019e0856-7a4d-7c6e-9687-cf9262eaf9f3" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_TradingSymbol"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_TradingSymbol_019e0856-7a4d-7c6e-9687-cf9262eaf9f3" xlink:type="arc" order="15"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_SecurityExchangeName_019e0856-7a4d-7c53-b8ff-d78ba65f408d" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_SecurityExchangeName"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_SecurityExchangeName_019e0856-7a4d-7c53-b8ff-d78ba65f408d" xlink:type="arc" order="16"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityCurrentReportingStatus_019e0856-7a4d-77c1-a3cf-195df32795cc" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_EntityCurrentReportingStatus"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_EntityCurrentReportingStatus_019e0856-7a4d-77c1-a3cf-195df32795cc" xlink:type="arc" order="17"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityInteractiveDataCurrent_019e0856-7a4d-767a-a234-b08322a8ffa5" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_EntityInteractiveDataCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_EntityInteractiveDataCurrent_019e0856-7a4d-767a-a234-b08322a8ffa5" xlink:type="arc" order="18"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityFilerCategory_019e0856-7a4d-770e-bc90-ebe48909f80d" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_EntityFilerCategory"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_EntityFilerCategory_019e0856-7a4d-770e-bc90-ebe48909f80d" xlink:type="arc" order="19"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntitySmallBusiness_019e0856-7a4d-761b-af04-d3377c7f1886" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_EntitySmallBusiness"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_EntitySmallBusiness_019e0856-7a4d-761b-af04-d3377c7f1886" xlink:type="arc" order="20"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityEmergingGrowthCompany_019e0856-7a4d-7e44-a530-09cd4f6a9570" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_EntityEmergingGrowthCompany"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_EntityEmergingGrowthCompany_019e0856-7a4d-7e44-a530-09cd4f6a9570" xlink:type="arc" order="21"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityShellCompany_019e0856-7a4d-780d-a724-5167d8197598" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_EntityShellCompany"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_EntityShellCompany_019e0856-7a4d-780d-a724-5167d8197598" xlink:type="arc" order="22"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityCommonStockSharesOutstanding_019e0856-7a4d-7647-89db-d6fe60d0fece" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_EntityCommonStockSharesOutstanding"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_EntityCommonStockSharesOutstanding_019e0856-7a4d-7647-89db-d6fe60d0fece" xlink:type="arc" order="23"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_EntityCentralIndexKey_019e0856-7a4d-707d-9a9b-27a6d0061b59" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_EntityCentralIndexKey"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_EntityCentralIndexKey_019e0856-7a4d-707d-9a9b-27a6d0061b59" xlink:type="arc" order="24"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentFiscalYearFocus_019e0856-7a4d-77ae-9c6f-5573d44b09a3" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_DocumentFiscalYearFocus"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_DocumentFiscalYearFocus_019e0856-7a4d-77ae-9c6f-5573d44b09a3" xlink:type="arc" order="25"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_CurrentFiscalYearEndDate_019e0856-7a4d-73cb-b1a1-1ffbc41ae24c" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_CurrentFiscalYearEndDate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_CurrentFiscalYearEndDate_019e0856-7a4d-73cb-b1a1-1ffbc41ae24c" xlink:type="arc" order="26"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_DocumentFiscalPeriodFocus_019e0856-7a4d-78cc-b4c6-6f5f60b5552a" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_DocumentFiscalPeriodFocus"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_DocumentFiscalPeriodFocus_019e0856-7a4d-78cc-b4c6-6f5f60b5552a" xlink:type="arc" order="27"/>
    <link:loc xlink:type="locator" xlink:label="loc_dei_AmendmentFlag_019e0856-7a4d-754d-bb0c-1272422e0ca6" xlink:href="https://xbrl.sec.gov/dei/2025/dei-2025.xsd#dei_AmendmentFlag"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_dei_EntityInformationLineItems_019e0856-7a4d-7027-90db-1dbb112c8563" xlink:to="loc_dei_AmendmentFlag_019e0856-7a4d-754d-bb0c-1272422e0ca6" xlink:type="arc" order="28"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFINCOME" xlink:type="simple" xlink:href="hsy-20260628.xsd#CONSOLIDATEDSTATEMENTSOFINCOME"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFINCOME" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_019e0856-7a4d-72c5-9ae3-f655b25a58e1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_019e0856-7a4d-70c7-a0f8-adb382b2dd3d" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-72c5-9ae3-f655b25a58e1" xlink:to="loc_us-gaap_StatementTable_019e0856-7a4d-70c7-a0f8-adb382b2dd3d" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-7e15-8f13-021e508f00af" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_019e0856-7a4d-70c7-a0f8-adb382b2dd3d" xlink:to="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-7e15-8f13-021e508f00af" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7e15-8f13-021e508f00af_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-7e15-8f13-021e508f00af" xlink:to="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7e15-8f13-021e508f00af_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7b5e-bd58-a33c29cc814f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-7e15-8f13-021e508f00af" xlink:to="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7b5e-bd58-a33c29cc814f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_019e0856-7a4d-7653-bbfc-1f4208a71e7a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7b5e-bd58-a33c29cc814f" xlink:to="loc_us-gaap_CommonStockMember_019e0856-7a4d-7653-bbfc-1f4208a71e7a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassBMember_019e0856-7a4d-7469-99c7-953c6b65119d" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonClassBMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7b5e-bd58-a33c29cc814f" xlink:to="loc_us-gaap_CommonClassBMember_019e0856-7a4d-7469-99c7-953c6b65119d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_019e0856-7a4d-7276-b4de-aabf64966b54" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-72c5-9ae3-f655b25a58e1" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_019e0856-7a4d-7276-b4de-aabf64966b54" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfGoodsAndServicesSold_019e0856-7a4d-7677-9d7a-16b010399bc8" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CostOfGoodsAndServicesSold"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-72c5-9ae3-f655b25a58e1" xlink:to="loc_us-gaap_CostOfGoodsAndServicesSold_019e0856-7a4d-7677-9d7a-16b010399bc8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GrossProfit_019e0856-7a4d-7af2-a8c9-96ecc1ea2b9e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_GrossProfit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-72c5-9ae3-f655b25a58e1" xlink:to="loc_us-gaap_GrossProfit_019e0856-7a4d-7af2-a8c9-96ecc1ea2b9e" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_019e0856-7a4d-7977-8745-67db91415c9e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-72c5-9ae3-f655b25a58e1" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_019e0856-7a4d-7977-8745-67db91415c9e" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_RestructuringChargesBusinessRealignment_019e0856-7a4d-7760-9e12-fced2ae767dd" xlink:href="hsy-20260628.xsd#hsy_RestructuringChargesBusinessRealignment"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-72c5-9ae3-f655b25a58e1" xlink:to="loc_hsy_RestructuringChargesBusinessRealignment_019e0856-7a4d-7760-9e12-fced2ae767dd" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_019e0856-7a4d-7e08-90db-7e23ebf1d834" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-72c5-9ae3-f655b25a58e1" xlink:to="loc_us-gaap_OperatingIncomeLoss_019e0856-7a4d-7e08-90db-7e23ebf1d834" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_019e0856-7a4d-7203-bc75-d5e8e98eb305" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_InterestIncomeExpenseNonoperatingNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-72c5-9ae3-f655b25a58e1" xlink:to="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_019e0856-7a4d-7203-bc75-d5e8e98eb305" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_019e0856-7a4d-7f00-b2dc-4adfe2c95af4" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-72c5-9ae3-f655b25a58e1" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_019e0856-7a4d-7f00-b2dc-4adfe2c95af4" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019e0856-7a4d-7441-89be-367e0773802e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-72c5-9ae3-f655b25a58e1" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019e0856-7a4d-7441-89be-367e0773802e" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeTaxExpenseBenefit_019e0856-7a4d-795a-aa26-acc27d92cfb7" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeTaxExpenseBenefit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-72c5-9ae3-f655b25a58e1" xlink:to="loc_us-gaap_IncomeTaxExpenseBenefit_019e0856-7a4d-795a-aa26-acc27d92cfb7" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_019e0856-7a4d-7a1a-bdf5-2bc0cdba1d98" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_NetIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-72c5-9ae3-f655b25a58e1" xlink:to="loc_us-gaap_NetIncomeLoss_019e0856-7a4d-7a1a-bdf5-2bc0cdba1d98" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareBasicAbstract_019e0856-7a4d-7f71-a59a-6f7886b63ccd" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EarningsPerShareBasicAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-72c5-9ae3-f655b25a58e1" xlink:to="loc_us-gaap_EarningsPerShareBasicAbstract_019e0856-7a4d-7f71-a59a-6f7886b63ccd" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareBasic_019e0856-7a4d-7f58-bb20-7ff30c940acb" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EarningsPerShareBasic"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicAbstract_019e0856-7a4d-7f71-a59a-6f7886b63ccd" xlink:to="loc_us-gaap_EarningsPerShareBasic_019e0856-7a4d-7f58-bb20-7ff30c940acb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareDilutedAbstract_019e0856-7a4d-7e4e-b79a-604b9020f586" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EarningsPerShareDilutedAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-72c5-9ae3-f655b25a58e1" xlink:to="loc_us-gaap_EarningsPerShareDilutedAbstract_019e0856-7a4d-7e4e-b79a-604b9020f586" xlink:type="arc" order="12"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareDiluted_019e0856-7a4d-71cd-a4cd-0db9ea32f3fd" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EarningsPerShareDiluted"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedAbstract_019e0856-7a4d-7e4e-b79a-604b9020f586" xlink:to="loc_us-gaap_EarningsPerShareDiluted_019e0856-7a4d-71cd-a4cd-0db9ea32f3fd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DividendsCommonStockAbstract_019e0856-7a4d-7259-baae-d57bba542f97" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DividendsCommonStockAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-72c5-9ae3-f655b25a58e1" xlink:to="loc_us-gaap_DividendsCommonStockAbstract_019e0856-7a4d-7259-baae-d57bba542f97" xlink:type="arc" order="13"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockDividendsPerShareCashPaid_019e0856-7a4d-7632-8ddb-ad6d79769039" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonStockDividendsPerShareCashPaid"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DividendsCommonStockAbstract_019e0856-7a4d-7259-baae-d57bba542f97" xlink:to="loc_us-gaap_CommonStockDividendsPerShareCashPaid_019e0856-7a4d-7632-8ddb-ad6d79769039" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDBALANCESHEETS" xlink:type="simple" xlink:href="hsy-20260628.xsd#CONSOLIDATEDBALANCESHEETS"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/CONSOLIDATEDBALANCESHEETS" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_019e0856-7a4d-75d3-8209-cf556c99845c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_019e0856-7a4d-70e0-a63a-75447645dce1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-75d3-8209-cf556c99845c" xlink:to="loc_us-gaap_StatementTable_019e0856-7a4d-70e0-a63a-75447645dce1" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-7c43-beab-8440af793e92" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_019e0856-7a4d-70e0-a63a-75447645dce1" xlink:to="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-7c43-beab-8440af793e92" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7c43-beab-8440af793e92_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-7c43-beab-8440af793e92" xlink:to="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7c43-beab-8440af793e92_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-701e-8584-ae62579d8c01" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-7c43-beab-8440af793e92" xlink:to="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-701e-8584-ae62579d8c01" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_019e0856-7a4d-70aa-9486-9814ce966ddf" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-701e-8584-ae62579d8c01" xlink:to="loc_us-gaap_CommonStockMember_019e0856-7a4d-70aa-9486-9814ce966ddf" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassBMember_019e0856-7a4d-7657-9c71-b58e9c224c77" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonClassBMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-701e-8584-ae62579d8c01" xlink:to="loc_us-gaap_CommonClassBMember_019e0856-7a4d-7657-9c71-b58e9c224c77" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsAbstract_019e0856-7a4d-7eb3-9ccb-e07537b0d528" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AssetsAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-75d3-8209-cf556c99845c" xlink:to="loc_us-gaap_AssetsAbstract_019e0856-7a4d-7eb3-9ccb-e07537b0d528" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrentAbstract_019e0856-7a4d-7fcf-b179-bf5ade69ef48" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AssetsCurrentAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_019e0856-7a4d-7eb3-9ccb-e07537b0d528" xlink:to="loc_us-gaap_AssetsCurrentAbstract_019e0856-7a4d-7fcf-b179-bf5ade69ef48" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_019e0856-7a4d-7ab0-9e1a-ff128f3afa9c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_019e0856-7a4d-7fcf-b179-bf5ade69ef48" xlink:to="loc_us-gaap_CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents_019e0856-7a4d-7ab0-9e1a-ff128f3afa9c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsReceivableNetCurrent_019e0856-7a4d-7439-8c69-790ddb009bb0" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AccountsReceivableNetCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_019e0856-7a4d-7fcf-b179-bf5ade69ef48" xlink:to="loc_us-gaap_AccountsReceivableNetCurrent_019e0856-7a4d-7439-8c69-790ddb009bb0" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InventoryNet_019e0856-7a4d-71a9-9a5c-aea64d9104fc" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_InventoryNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_019e0856-7a4d-7fcf-b179-bf5ade69ef48" xlink:to="loc_us-gaap_InventoryNet_019e0856-7a4d-71a9-9a5c-aea64d9104fc" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_019e0856-7a4d-7636-99c9-07636dc9e9cf" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_PrepaidExpenseAndOtherAssetsCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_019e0856-7a4d-7fcf-b179-bf5ade69ef48" xlink:to="loc_us-gaap_PrepaidExpenseAndOtherAssetsCurrent_019e0856-7a4d-7636-99c9-07636dc9e9cf" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AssetsCurrent_019e0856-7a4d-7ff2-bf24-512f65cad74a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AssetsCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsCurrentAbstract_019e0856-7a4d-7fcf-b179-bf5ade69ef48" xlink:to="loc_us-gaap_AssetsCurrent_019e0856-7a4d-7ff2-bf24-512f65cad74a" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentNet_019e0856-7a4d-7fa1-a9a8-a19062293a1f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_PropertyPlantAndEquipmentNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_019e0856-7a4d-7eb3-9ccb-e07537b0d528" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentNet_019e0856-7a4d-7fa1-a9a8-a19062293a1f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_019e0856-7a4d-7680-a1a3-01e788f41b9c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_Goodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_019e0856-7a4d-7eb3-9ccb-e07537b0d528" xlink:to="loc_us-gaap_Goodwill_019e0856-7a4d-7680-a1a3-01e788f41b9c" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_019e0856-7a4d-7e85-90dc-d876a6774bcf" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_019e0856-7a4d-7eb3-9ccb-e07537b0d528" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_019e0856-7a4d-7e85-90dc-d876a6774bcf" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherAssetsNoncurrent_019e0856-7a4d-7501-bb59-6bf8d0645621" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherAssetsNoncurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_019e0856-7a4d-7eb3-9ccb-e07537b0d528" xlink:to="loc_us-gaap_OtherAssetsNoncurrent_019e0856-7a4d-7501-bb59-6bf8d0645621" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxAssetsNet_019e0856-7a4d-7159-87ee-351c3f354808" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DeferredIncomeTaxAssetsNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_019e0856-7a4d-7eb3-9ccb-e07537b0d528" xlink:to="loc_us-gaap_DeferredIncomeTaxAssetsNet_019e0856-7a4d-7159-87ee-351c3f354808" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Assets_019e0856-7a4d-75a3-bfe3-a252274fd21a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_Assets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AssetsAbstract_019e0856-7a4d-7eb3-9ccb-e07537b0d528" xlink:to="loc_us-gaap_Assets_019e0856-7a4d-75a3-bfe3-a252274fd21a" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_019e0856-7a4d-7f1e-afbb-742fb6c3fdbe" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LiabilitiesAndStockholdersEquityAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-75d3-8209-cf556c99845c" xlink:to="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_019e0856-7a4d-7f1e-afbb-742fb6c3fdbe" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrentAbstract_019e0856-7a4d-7f1f-8de1-885bb039c4aa" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LiabilitiesCurrentAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_019e0856-7a4d-7f1e-afbb-742fb6c3fdbe" xlink:to="loc_us-gaap_LiabilitiesCurrentAbstract_019e0856-7a4d-7f1f-8de1-885bb039c4aa" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccountsPayableCurrent_019e0856-7a4d-7f84-a4f8-3ddc3e09c4f2" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AccountsPayableCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_019e0856-7a4d-7f1f-8de1-885bb039c4aa" xlink:to="loc_us-gaap_AccountsPayableCurrent_019e0856-7a4d-7f84-a4f8-3ddc3e09c4f2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent_019e0856-7a4d-7954-8227-438d8874af35" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_019e0856-7a4d-7f1f-8de1-885bb039c4aa" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent_019e0856-7a4d-7954-8227-438d8874af35" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedIncomeTaxesCurrent_019e0856-7a4d-76bb-acc0-0e03f27666ba" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AccruedIncomeTaxesCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_019e0856-7a4d-7f1f-8de1-885bb039c4aa" xlink:to="loc_us-gaap_AccruedIncomeTaxesCurrent_019e0856-7a4d-76bb-acc0-0e03f27666ba" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermBorrowings_019e0856-7a4d-7b79-b332-63de5c875aaf" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShortTermBorrowings"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_019e0856-7a4d-7f1f-8de1-885bb039c4aa" xlink:to="loc_us-gaap_ShortTermBorrowings_019e0856-7a4d-7b79-b332-63de5c875aaf" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtCurrent_019e0856-7a4d-794d-9059-88dfdeca67fa" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongTermDebtCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_019e0856-7a4d-7f1f-8de1-885bb039c4aa" xlink:to="loc_us-gaap_LongTermDebtCurrent_019e0856-7a4d-794d-9059-88dfdeca67fa" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrent_019e0856-7a4d-75c3-8bd9-fbc1dc636af9" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LiabilitiesCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract_019e0856-7a4d-7f1f-8de1-885bb039c4aa" xlink:to="loc_us-gaap_LiabilitiesCurrent_019e0856-7a4d-75c3-8bd9-fbc1dc636af9" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtAndCapitalLeaseObligations_019e0856-7a4d-7c24-a44c-2e86d50f9ada" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongTermDebtAndCapitalLeaseObligations"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_019e0856-7a4d-7f1e-afbb-742fb6c3fdbe" xlink:to="loc_us-gaap_LongTermDebtAndCapitalLeaseObligations_019e0856-7a4d-7c24-a44c-2e86d50f9ada" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherLiabilitiesNoncurrent_019e0856-7a4d-7486-92ca-f6cfc7b09c30" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherLiabilitiesNoncurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_019e0856-7a4d-7f1e-afbb-742fb6c3fdbe" xlink:to="loc_us-gaap_OtherLiabilitiesNoncurrent_019e0856-7a4d-7486-92ca-f6cfc7b09c30" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_019e0856-7a4d-79a5-874a-7e4fc127be62" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DeferredIncomeTaxLiabilitiesNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_019e0856-7a4d-7f1e-afbb-742fb6c3fdbe" xlink:to="loc_us-gaap_DeferredIncomeTaxLiabilitiesNet_019e0856-7a4d-79a5-874a-7e4fc127be62" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Liabilities_019e0856-7a4d-7a2d-87a5-f94d7772f055" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_Liabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_019e0856-7a4d-7f1e-afbb-742fb6c3fdbe" xlink:to="loc_us-gaap_Liabilities_019e0856-7a4d-7a2d-87a5-f94d7772f055" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_019e0856-7a4d-736d-9845-47d49dfe62c3" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_019e0856-7a4d-7f1e-afbb-742fb6c3fdbe" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_019e0856-7a4d-736d-9845-47d49dfe62c3" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockValue_019e0856-7a4d-7e0f-91b4-c830c27fdf55" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_PreferredStockValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_019e0856-7a4d-736d-9845-47d49dfe62c3" xlink:to="loc_us-gaap_PreferredStockValue_019e0856-7a4d-7e0f-91b4-c830c27fdf55" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockValue_019e0856-7a4d-7873-be3e-c65e4a724f48" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonStockValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_019e0856-7a4d-736d-9845-47d49dfe62c3" xlink:to="loc_us-gaap_CommonStockValue_019e0856-7a4d-7873-be3e-c65e4a724f48" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapital_019e0856-7a4d-78c7-a59c-0864c2d39ae0" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AdditionalPaidInCapital"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_019e0856-7a4d-736d-9845-47d49dfe62c3" xlink:to="loc_us-gaap_AdditionalPaidInCapital_019e0856-7a4d-78c7-a59c-0864c2d39ae0" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsAccumulatedDeficit_019e0856-7a4d-7a1b-b1c8-d418d745c316" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RetainedEarningsAccumulatedDeficit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_019e0856-7a4d-736d-9845-47d49dfe62c3" xlink:to="loc_us-gaap_RetainedEarningsAccumulatedDeficit_019e0856-7a4d-7a1b-b1c8-d418d745c316" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockCommonValue_019e0856-7a4d-7d92-9116-6d5410198cf7" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_TreasuryStockCommonValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_019e0856-7a4d-736d-9845-47d49dfe62c3" xlink:to="loc_us-gaap_TreasuryStockCommonValue_019e0856-7a4d-7d92-9116-6d5410198cf7" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_019e0856-7a4d-70ae-b8d6-4208f2a4c947" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_019e0856-7a4d-736d-9845-47d49dfe62c3" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_019e0856-7a4d-70ae-b8d6-4208f2a4c947" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_019e0856-7a4d-700d-bdb7-d3c450d5c12c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterestAbstract_019e0856-7a4d-736d-9845-47d49dfe62c3" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_019e0856-7a4d-700d-bdb7-d3c450d5c12c" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesAndStockholdersEquity_019e0856-7a4d-7c06-a8a4-de99f3ba8afc" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LiabilitiesAndStockholdersEquity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesAndStockholdersEquityAbstract_019e0856-7a4d-7f1e-afbb-742fb6c3fdbe" xlink:to="loc_us-gaap_LiabilitiesAndStockholdersEquity_019e0856-7a4d-7c06-a8a4-de99f3ba8afc" xlink:type="arc" order="7"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDBALANCESHEETSParenthetical" xlink:type="simple" xlink:href="hsy-20260628.xsd#CONSOLIDATEDBALANCESHEETSParenthetical"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/CONSOLIDATEDBALANCESHEETSParenthetical" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_019e0856-7a4d-7e2e-9e1b-ad552975e0be" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_019e0856-7a4d-7e61-8e45-33706487cef3" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-7e2e-9e1b-ad552975e0be" xlink:to="loc_us-gaap_StatementTable_019e0856-7a4d-7e61-8e45-33706487cef3" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-7fb0-953e-7433b301c941" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_019e0856-7a4d-7e61-8e45-33706487cef3" xlink:to="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-7fb0-953e-7433b301c941" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7fb0-953e-7433b301c941_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-7fb0-953e-7433b301c941" xlink:to="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7fb0-953e-7433b301c941_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7824-b2fd-63439a94d3a1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-7fb0-953e-7433b301c941" xlink:to="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7824-b2fd-63439a94d3a1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_019e0856-7a4d-74de-8499-d24e743dc4fa" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7824-b2fd-63439a94d3a1" xlink:to="loc_us-gaap_CommonStockMember_019e0856-7a4d-74de-8499-d24e743dc4fa" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassBMember_019e0856-7a4d-7716-943e-51e871532433" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonClassBMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7824-b2fd-63439a94d3a1" xlink:to="loc_us-gaap_CommonClassBMember_019e0856-7a4d-7716-943e-51e871532433" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockSharesIssued_019e0856-7a4d-7c42-866a-35376da6abd0" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_PreferredStockSharesIssued"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-7e2e-9e1b-ad552975e0be" xlink:to="loc_us-gaap_PreferredStockSharesIssued_019e0856-7a4d-7c42-866a-35376da6abd0" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockSharesIssued_019e0856-7a4d-7f23-8ad5-ac38f9efcdd0" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonStockSharesIssued"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-7e2e-9e1b-ad552975e0be" xlink:to="loc_us-gaap_CommonStockSharesIssued_019e0856-7a4d-7f23-8ad5-ac38f9efcdd0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockCommonShares_019e0856-7a4d-7216-8a4f-775bd9b8e255" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_TreasuryStockCommonShares"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-7e2e-9e1b-ad552975e0be" xlink:to="loc_us-gaap_TreasuryStockCommonShares_019e0856-7a4d-7216-8a4f-775bd9b8e255" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITY" xlink:type="simple" xlink:href="hsy-20260628.xsd#CONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITY"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITY" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_019e0856-7a4d-7b22-86e0-7a8d212a0d1f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_019e0856-7a4d-79c3-935f-4ffb42a3bc81" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-7b22-86e0-7a8d212a0d1f" xlink:to="loc_us-gaap_StatementTable_019e0856-7a4d-79c3-935f-4ffb42a3bc81" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_019e0856-7a4d-7740-af8d-500dd735d6c2" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementEquityComponentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_019e0856-7a4d-79c3-935f-4ffb42a3bc81" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_019e0856-7a4d-7740-af8d-500dd735d6c2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_019e0856-7a4d-7740-af8d-500dd735d6c2_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_019e0856-7a4d-7740-af8d-500dd735d6c2" xlink:to="loc_us-gaap_EquityComponentDomain_019e0856-7a4d-7740-af8d-500dd735d6c2_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_019e0856-7a4d-7df0-9c2f-6c1eb443bd75" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_019e0856-7a4d-7740-af8d-500dd735d6c2" xlink:to="loc_us-gaap_EquityComponentDomain_019e0856-7a4d-7df0-9c2f-6c1eb443bd75" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PreferredStockMember_019e0856-7a4d-7a77-b299-58bf9e177120" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_PreferredStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_019e0856-7a4d-7df0-9c2f-6c1eb443bd75" xlink:to="loc_us-gaap_PreferredStockMember_019e0856-7a4d-7a77-b299-58bf9e177120" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_019e0856-7a4d-70d4-b0ce-5781285b637a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_019e0856-7a4d-7df0-9c2f-6c1eb443bd75" xlink:to="loc_us-gaap_CommonStockMember_019e0856-7a4d-70d4-b0ce-5781285b637a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdditionalPaidInCapitalMember_019e0856-7a4d-7039-87b3-07a9ec22cf60" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AdditionalPaidInCapitalMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_019e0856-7a4d-7df0-9c2f-6c1eb443bd75" xlink:to="loc_us-gaap_AdditionalPaidInCapitalMember_019e0856-7a4d-7039-87b3-07a9ec22cf60" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsMember_019e0856-7a4d-7333-a3a4-d1d5d09a9ce2" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RetainedEarningsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_019e0856-7a4d-7df0-9c2f-6c1eb443bd75" xlink:to="loc_us-gaap_RetainedEarningsMember_019e0856-7a4d-7333-a3a4-d1d5d09a9ce2" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockCommonMember_019e0856-7a4d-70b5-982f-b0a2294febf7" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_TreasuryStockCommonMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_019e0856-7a4d-7df0-9c2f-6c1eb443bd75" xlink:to="loc_us-gaap_TreasuryStockCommonMember_019e0856-7a4d-70b5-982f-b0a2294febf7" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_019e0856-7a4d-76b6-ac4a-47caec89a7c6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_019e0856-7a4d-7df0-9c2f-6c1eb443bd75" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_019e0856-7a4d-76b6-ac4a-47caec89a7c6" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-7413-a3aa-4a607665e378" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_019e0856-7a4d-79c3-935f-4ffb42a3bc81" xlink:to="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-7413-a3aa-4a607665e378" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7413-a3aa-4a607665e378_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-7413-a3aa-4a607665e378" xlink:to="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7413-a3aa-4a607665e378_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7325-926f-bc1be776c615" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-7413-a3aa-4a607665e378" xlink:to="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7325-926f-bc1be776c615" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_019e0856-7a4d-7380-a1ed-b6a157d96c81" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7325-926f-bc1be776c615" xlink:to="loc_us-gaap_CommonStockMember_019e0856-7a4d-7380-a1ed-b6a157d96c81" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassBMember_019e0856-7a4d-7726-81d8-6bab4fc44e31" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonClassBMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7325-926f-bc1be776c615" xlink:to="loc_us-gaap_CommonClassBMember_019e0856-7a4d-7726-81d8-6bab4fc44e31" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_019e0856-7a4d-7629-a7b3-55749f9ef3f7" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncreaseDecreaseInStockholdersEquityRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-7b22-86e0-7a8d212a0d1f" xlink:to="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_019e0856-7a4d-7629-a7b3-55749f9ef3f7" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_019e0856-7a4d-711a-ae1a-195bb03cd17c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_019e0856-7a4d-7629-a7b3-55749f9ef3f7" xlink:to="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_019e0856-7a4d-711a-ae1a-195bb03cd17c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_019e0856-7a4d-7953-9f26-e8bea1bbd0cb" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_NetIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_019e0856-7a4d-7629-a7b3-55749f9ef3f7" xlink:to="loc_us-gaap_NetIncomeLoss_019e0856-7a4d-7953-9f26-e8bea1bbd0cb" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_019e0856-7a4d-7149-9ab6-4318c4de0c26" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherComprehensiveIncomeLossNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_019e0856-7a4d-7629-a7b3-55749f9ef3f7" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossNetOfTax_019e0856-7a4d-7149-9ab6-4318c4de0c26" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DividendsCommonStockAbstract_019e0856-7a4d-78c0-82f7-4099c9c68597" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DividendsCommonStockAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_019e0856-7a4d-7629-a7b3-55749f9ef3f7" xlink:to="loc_us-gaap_DividendsCommonStockAbstract_019e0856-7a4d-78c0-82f7-4099c9c68597" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DividendsCommonStockCash_019e0856-7a4d-746e-84e9-cf4d0ba23209" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DividendsCommonStockCash"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DividendsCommonStockAbstract_019e0856-7a4d-78c0-82f7-4099c9c68597" xlink:to="loc_us-gaap_DividendsCommonStockCash_019e0856-7a4d-746e-84e9-cf4d0ba23209" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_019e0856-7a4d-7c4d-ab5d-874a7cc8127f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_019e0856-7a4d-7629-a7b3-55749f9ef3f7" xlink:to="loc_us-gaap_AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue_019e0856-7a4d-7c4d-ab5d-874a7cc8127f" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_StockIssuedDuringPeriodValueStockOptionsExercisedAndIncentiveBasedTransactions_019e0856-7a4d-73ac-a0f6-d423fdf310d9" xlink:href="hsy-20260628.xsd#hsy_StockIssuedDuringPeriodValueStockOptionsExercisedAndIncentiveBasedTransactions"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_019e0856-7a4d-7629-a7b3-55749f9ef3f7" xlink:to="loc_hsy_StockIssuedDuringPeriodValueStockOptionsExercisedAndIncentiveBasedTransactions_019e0856-7a4d-73ac-a0f6-d423fdf310d9" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_TreasuryStockValueAcquiredCostMethodIncludingExciseTax_019e0856-7a4d-7a10-b20b-edf762ad3299" xlink:href="hsy-20260628.xsd#hsy_TreasuryStockValueAcquiredCostMethodIncludingExciseTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_019e0856-7a4d-7629-a7b3-55749f9ef3f7" xlink:to="loc_hsy_TreasuryStockValueAcquiredCostMethodIncludingExciseTax_019e0856-7a4d-7a10-b20b-edf762ad3299" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest_019e0856-7a4d-734d-8696-6a72826383e6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYParenthetical" xlink:type="simple" xlink:href="hsy-20260628.xsd#CONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYParenthetical"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/CONSOLIDATEDSTATEMENTSOFSTOCKHOLDERSEQUITYParenthetical" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_019e0856-7a4d-7471-a25c-6811aecc1713" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_019e0856-7a4d-7b5a-aee9-74ab81a38f35" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-7471-a25c-6811aecc1713" xlink:to="loc_us-gaap_StatementTable_019e0856-7a4d-7b5a-aee9-74ab81a38f35" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-7a50-aa41-2d7e0d5149c2" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_019e0856-7a4d-7b5a-aee9-74ab81a38f35" xlink:to="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-7a50-aa41-2d7e0d5149c2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7a50-aa41-2d7e0d5149c2_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-7a50-aa41-2d7e0d5149c2" xlink:to="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-7a50-aa41-2d7e0d5149c2_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-709d-a6b5-37df9d4066f7" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_019e0856-7a4d-7a50-aa41-2d7e0d5149c2" xlink:to="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-709d-a6b5-37df9d4066f7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_019e0856-7a4d-7da8-8434-e667414e2a2b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-709d-a6b5-37df9d4066f7" xlink:to="loc_us-gaap_CommonStockMember_019e0856-7a4d-7da8-8434-e667414e2a2b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassBMember_019e0856-7a4d-7fa2-842d-2cb37153c16e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonClassBMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_019e0856-7a4d-709d-a6b5-37df9d4066f7" xlink:to="loc_us-gaap_CommonClassBMember_019e0856-7a4d-7fa2-842d-2cb37153c16e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockDividendsPerShareCashPaid_019e0856-7a4d-7d40-9f8d-ccfd81e3ec1d" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonStockDividendsPerShareCashPaid"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_019e0856-7a4d-7471-a25c-6811aecc1713" xlink:to="loc_us-gaap_CommonStockDividendsPerShareCashPaid_019e0856-7a4d-7d40-9f8d-ccfd81e3ec1d" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/BUSINESSACQUISITIONSLESSEREVILLLCNARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#BUSINESSACQUISITIONSLESSEREVILLLCNARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BUSINESSACQUISITIONSLESSEREVILLLCNARRATIVEDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-73a9-8960-dbc909deb406" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessAcquisitionLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_019e0856-7a4d-777f-8c95-273de6068b74" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-73a9-8960-dbc909deb406" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_019e0856-7a4d-777f-8c95-273de6068b74" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_019e0856-7a4d-71a0-aa55-1ea4821018bc" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_019e0856-7a4d-777f-8c95-273de6068b74" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_019e0856-7a4d-71a0-aa55-1ea4821018bc" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_019e0856-7a4d-71a0-aa55-1ea4821018bc_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_019e0856-7a4d-71a0-aa55-1ea4821018bc" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_019e0856-7a4d-71a0-aa55-1ea4821018bc_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_019e0856-7a4d-7c3f-9537-066099367119" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_019e0856-7a4d-71a0-aa55-1ea4821018bc" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_019e0856-7a4d-7c3f-9537-066099367119" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesserEvilLLCMember_019e0856-7a4d-7c26-ad61-6a87df840ab7" xlink:href="hsy-20260628.xsd#hsy_LesserEvilLLCMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_019e0856-7a4d-7c3f-9537-066099367119" xlink:to="loc_hsy_LesserEvilLLCMember_019e0856-7a4d-7c26-ad61-6a87df840ab7" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_019e0856-7a4d-7343-a92a-104b876ebbc9" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_019e0856-7a4d-777f-8c95-273de6068b74" xlink:to="loc_srt_RangeAxis_019e0856-7a4d-7343-a92a-104b876ebbc9" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_019e0856-7a4d-7343-a92a-104b876ebbc9_default" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_019e0856-7a4d-7343-a92a-104b876ebbc9" xlink:to="loc_srt_RangeMember_019e0856-7a4d-7343-a92a-104b876ebbc9_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_019e0856-7a4d-7346-a8de-b2fc4fa0ed79" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_019e0856-7a4d-7343-a92a-104b876ebbc9" xlink:to="loc_srt_RangeMember_019e0856-7a4d-7346-a8de-b2fc4fa0ed79" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_019e0856-7a4d-7389-8421-8c226d5cbaec" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_019e0856-7a4d-7346-a8de-b2fc4fa0ed79" xlink:to="loc_srt_MinimumMember_019e0856-7a4d-7389-8421-8c226d5cbaec" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_019e0856-7a4d-7fca-9ee0-737ba1388fba" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_019e0856-7a4d-7346-a8de-b2fc4fa0ed79" xlink:to="loc_srt_MaximumMember_019e0856-7a4d-7fca-9ee0-737ba1388fba" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationConsiderationTransferred1_019e0856-7a4d-71ed-9b4d-e1acb6091de8" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessCombinationConsiderationTransferred1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-73a9-8960-dbc909deb406" xlink:to="loc_us-gaap_BusinessCombinationConsiderationTransferred1_019e0856-7a4d-71ed-9b4d-e1acb6091de8" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationContingentConsiderationLiability_019e0856-7a4d-7dd6-8a10-d8659397aabf" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessCombinationContingentConsiderationLiability"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-73a9-8960-dbc909deb406" xlink:to="loc_us-gaap_BusinessCombinationContingentConsiderationLiability_019e0856-7a4d-7dd6-8a10-d8659397aabf" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/BUSINESSACQUISITIONSLESSEREVILLLCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#BUSINESSACQUISITIONSLESSEREVILLLCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BUSINESSACQUISITIONSLESSEREVILLLCASSETSACQUIREDANDLIABILITIESASSUMEDALLOCATIONDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7a3f-a37b-70e2b3b00274" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessAcquisitionLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_019e0856-7a4d-7d87-bc23-0e88d97b33f5" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7a3f-a37b-70e2b3b00274" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_019e0856-7a4d-7d87-bc23-0e88d97b33f5" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_019e0856-7a4d-7601-afcc-70986546ccaf" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_019e0856-7a4d-7d87-bc23-0e88d97b33f5" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_019e0856-7a4d-7601-afcc-70986546ccaf" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_019e0856-7a4d-7601-afcc-70986546ccaf_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_019e0856-7a4d-7601-afcc-70986546ccaf" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_019e0856-7a4d-7601-afcc-70986546ccaf_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_019e0856-7a4d-7966-aacc-67de49060a23" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_019e0856-7a4d-7601-afcc-70986546ccaf" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_019e0856-7a4d-7966-aacc-67de49060a23" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesserEvilLLCMember_019e0856-7a4d-7d88-bc16-17b9d70aeb16" xlink:href="hsy-20260628.xsd#hsy_LesserEvilLLCMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_019e0856-7a4d-7966-aacc-67de49060a23" xlink:to="loc_hsy_LesserEvilLLCMember_019e0856-7a4d-7d88-bc16-17b9d70aeb16" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_019e0856-7a4d-702f-9a33-27f7a7814d44" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_Goodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7a3f-a37b-70e2b3b00274" xlink:to="loc_us-gaap_Goodwill_019e0856-7a4d-702f-9a33-27f7a7814d44" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillPurchaseAccountingAdjustments_019f80c2-4b4f-7a3e-9fcb-2a4740f42032" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_GoodwillPurchaseAccountingAdjustments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7a3f-a37b-70e2b3b00274" xlink:to="loc_us-gaap_GoodwillPurchaseAccountingAdjustments_019f80c2-4b4f-7a3e-9fcb-2a4740f42032" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibleAssetsOtherThanGoodwill_019e0856-7a4d-7330-9f43-26e2ef10ae55" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibleAssetsOtherThanGoodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7a3f-a37b-70e2b3b00274" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibleAssetsOtherThanGoodwill_019e0856-7a4d-7330-9f43-26e2ef10ae55" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets_019e0856-7a4d-7944-997d-f7521706b5ba" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7a3f-a37b-70e2b3b00274" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentAssets_019e0856-7a4d-7944-997d-f7521706b5ba" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_019e0856-7a4d-7c63-a9b9-3284f222fd69" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7a3f-a37b-70e2b3b00274" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedPropertyPlantAndEquipment_019e0856-7a4d-7c63-a9b9-3284f222fd69" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentPropertyPlantAndEquipment_019f80c2-4b4f-73c9-a8e4-181df6e4061d" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentPropertyPlantAndEquipment"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7a3f-a37b-70e2b3b00274" xlink:to="loc_us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentPropertyPlantAndEquipment_019f80c2-4b4f-73c9-a8e4-181df6e4061d" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets_019e0856-7a4d-7deb-b97f-606d4d3c8836" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7a3f-a37b-70e2b3b00274" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedOtherNoncurrentAssets_019e0856-7a4d-7deb-b97f-606d4d3c8836" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities_019e0856-7a4d-72f4-a4e8-1867593a4611" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7a3f-a37b-70e2b3b00274" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedCurrentLiabilities_019e0856-7a4d-72f4-a4e8-1867593a4611" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilities_019e0856-7a4d-79ab-8cd6-04a3191f38d2" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7a3f-a37b-70e2b3b00274" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedNoncurrentLiabilities_019e0856-7a4d-79ab-8cd6-04a3191f38d2" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxLiabilities_019e0856-7a4d-77f0-bb61-b91f4e7cba5a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxLiabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7a3f-a37b-70e2b3b00274" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedDeferredTaxLiabilities_019e0856-7a4d-77f0-bb61-b91f4e7cba5a" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentConsiderationTransferred_019f80c2-4b4f-761d-8e47-ac4260d76b59" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentConsiderationTransferred"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7a3f-a37b-70e2b3b00274" xlink:to="loc_us-gaap_BusinessCombinationProvisionalInformationInitialAccountingIncompleteAdjustmentConsiderationTransferred_019f80c2-4b4f-761d-8e47-ac4260d76b59" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredGoodwillAndLiabilitiesAssumedNet_019e0856-7a4d-79df-94aa-b01eff10f3e0" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredGoodwillAndLiabilitiesAssumedNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7a3f-a37b-70e2b3b00274" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredGoodwillAndLiabilitiesAssumedNet_019e0856-7a4d-79df-94aa-b01eff10f3e0" xlink:type="arc" order="11"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/BUSINESSACQUISITIONSLESSEREVILLLCOTHERINTANGIBLEASSETSDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#BUSINESSACQUISITIONSLESSEREVILLLCOTHERINTANGIBLEASSETSDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BUSINESSACQUISITIONSLESSEREVILLLCOTHERINTANGIBLEASSETSDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7082-8fe1-1d46ca73004d" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessAcquisitionLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_019e0856-7a4d-7e86-8ead-295960ac1f20" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7082-8fe1-1d46ca73004d" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_019e0856-7a4d-7e86-8ead-295960ac1f20" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_019e0856-7a4d-7d82-8a43-cbdc738121cb" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_019e0856-7a4d-7e86-8ead-295960ac1f20" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_019e0856-7a4d-7d82-8a43-cbdc738121cb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_019e0856-7a4d-7d82-8a43-cbdc738121cb_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_019e0856-7a4d-7d82-8a43-cbdc738121cb" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_019e0856-7a4d-7d82-8a43-cbdc738121cb_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_019e0856-7a4d-7a24-916b-60c2b8da6467" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_019e0856-7a4d-7d82-8a43-cbdc738121cb" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_019e0856-7a4d-7a24-916b-60c2b8da6467" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LesserEvilLLCMember_019e0856-7a4d-7c76-bcec-ce5aac2ab925" xlink:href="hsy-20260628.xsd#hsy_LesserEvilLLCMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_019e0856-7a4d-7a24-916b-60c2b8da6467" xlink:to="loc_hsy_LesserEvilLLCMember_019e0856-7a4d-7c76-bcec-ce5aac2ab925" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_019e0856-7a4d-782c-8a5b-55c08d2f19ad" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_019e0856-7a4d-7e86-8ead-295960ac1f20" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_019e0856-7a4d-782c-8a5b-55c08d2f19ad" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-782c-8a5b-55c08d2f19ad_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_019e0856-7a4d-782c-8a5b-55c08d2f19ad" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-782c-8a5b-55c08d2f19ad_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-713d-99b8-791ecddf5ea2" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_019e0856-7a4d-782c-8a5b-55c08d2f19ad" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-713d-99b8-791ecddf5ea2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TrademarksMember_019e0856-7a4d-71b4-b1d9-f13f32b43196" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_TrademarksMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-713d-99b8-791ecddf5ea2" xlink:to="loc_us-gaap_TrademarksMember_019e0856-7a4d-71b4-b1d9-f13f32b43196" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_019e0856-7a4d-75e9-aa64-7391ec582be5" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_019e0856-7a4d-7e86-8ead-295960ac1f20" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_019e0856-7a4d-75e9-aa64-7391ec582be5" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-75e9-aa64-7391ec582be5_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_019e0856-7a4d-75e9-aa64-7391ec582be5" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-75e9-aa64-7391ec582be5_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-7144-bfb4-5809f4815497" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_019e0856-7a4d-75e9-aa64-7391ec582be5" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-7144-bfb4-5809f4815497" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CustomerRelatedIntangibleAssetsMember_019e0856-7a4d-7620-998a-036a924f7f5e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CustomerRelatedIntangibleAssetsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-7144-bfb4-5809f4815497" xlink:to="loc_us-gaap_CustomerRelatedIntangibleAssetsMember_019e0856-7a4d-7620-998a-036a924f7f5e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibleAssetsOtherThanGoodwill_019e0856-7a4d-71cc-bb77-300d7f1b8db9" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibleAssetsOtherThanGoodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7082-8fe1-1d46ca73004d" xlink:to="loc_us-gaap_BusinessCombinationRecognizedIdentifiableAssetsAcquiredAndLiabilitiesAssumedIntangibleAssetsOtherThanGoodwill_019e0856-7a4d-71cc-bb77-300d7f1b8db9" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_019e0856-7a4d-780b-a403-13873c38883f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetUsefulLife"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7082-8fe1-1d46ca73004d" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_019e0856-7a4d-780b-a403-13873c38883f" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/BUSINESSACQUISITIONSSOURSTRIPSNARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#BUSINESSACQUISITIONSSOURSTRIPSNARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BUSINESSACQUISITIONSSOURSTRIPSNARRATIVEDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7728-a6e4-18a1937f8c3e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessAcquisitionLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_019e0856-7a4d-79de-b616-84c077b454e8" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7728-a6e4-18a1937f8c3e" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_019e0856-7a4d-79de-b616-84c077b454e8" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAxis_019e0856-7a4d-7db8-8c2f-d64b9a22a769" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessAcquisitionAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_019e0856-7a4d-79de-b616-84c077b454e8" xlink:to="loc_us-gaap_BusinessAcquisitionAxis_019e0856-7a4d-7db8-8c2f-d64b9a22a769" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_019e0856-7a4d-7db8-8c2f-d64b9a22a769_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_019e0856-7a4d-7db8-8c2f-d64b9a22a769" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_019e0856-7a4d-7db8-8c2f-d64b9a22a769_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionAcquireeDomain_019e0856-7a4d-7aa8-b1b8-60220f272e88" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessAcquisitionAcquireeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BusinessAcquisitionAxis_019e0856-7a4d-7db8-8c2f-d64b9a22a769" xlink:to="loc_us-gaap_BusinessAcquisitionAcquireeDomain_019e0856-7a4d-7aa8-b1b8-60220f272e88" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_SourStripsMember_019e0856-7a4d-7502-b788-a5db53e86e46" xlink:href="hsy-20260628.xsd#hsy_SourStripsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionAcquireeDomain_019e0856-7a4d-7aa8-b1b8-60220f272e88" xlink:to="loc_hsy_SourStripsMember_019e0856-7a4d-7502-b788-a5db53e86e46" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_019e0856-7a4d-7a63-bd26-7cb4671e1ae6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_019e0856-7a4d-79de-b616-84c077b454e8" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_019e0856-7a4d-7a63-bd26-7cb4671e1ae6" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-7a63-bd26-7cb4671e1ae6_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_019e0856-7a4d-7a63-bd26-7cb4671e1ae6" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-7a63-bd26-7cb4671e1ae6_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-7775-bef9-b455c6c9c27f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_019e0856-7a4d-7a63-bd26-7cb4671e1ae6" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-7775-bef9-b455c6c9c27f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TrademarksMember_019e0856-7a4d-7578-bd3c-69445ba0abbf" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_TrademarksMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-7775-bef9-b455c6c9c27f" xlink:to="loc_us-gaap_TrademarksMember_019e0856-7a4d-7578-bd3c-69445ba0abbf" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CustomerRelationshipsMember_019e0856-7a4d-753e-97f6-a04b1e295be1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CustomerRelationshipsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-7775-bef9-b455c6c9c27f" xlink:to="loc_us-gaap_CustomerRelationshipsMember_019e0856-7a4d-753e-97f6-a04b1e295be1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_019e0856-7a4d-72bf-abda-4deca98ff313" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_019e0856-7a4d-79de-b616-84c077b454e8" xlink:to="loc_srt_RangeAxis_019e0856-7a4d-72bf-abda-4deca98ff313" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_019e0856-7a4d-72bf-abda-4deca98ff313_default" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_019e0856-7a4d-72bf-abda-4deca98ff313" xlink:to="loc_srt_RangeMember_019e0856-7a4d-72bf-abda-4deca98ff313_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_019e0856-7a4d-7e42-b427-eb901f7788ea" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_019e0856-7a4d-72bf-abda-4deca98ff313" xlink:to="loc_srt_RangeMember_019e0856-7a4d-7e42-b427-eb901f7788ea" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_019e0856-7a4d-7817-b049-352eaa46b957" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_019e0856-7a4d-7e42-b427-eb901f7788ea" xlink:to="loc_srt_MinimumMember_019e0856-7a4d-7817-b049-352eaa46b957" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_019e0856-7a4d-7cda-8199-df7b0491ec6e" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_019e0856-7a4d-7e42-b427-eb901f7788ea" xlink:to="loc_srt_MaximumMember_019e0856-7a4d-7cda-8199-df7b0491ec6e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedTrademarksGross_019e0856-7a4d-755d-a982-a7638f0a9f17" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedTrademarksGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7728-a6e4-18a1937f8c3e" xlink:to="loc_us-gaap_FiniteLivedTrademarksGross_019e0856-7a4d-755d-a982-a7638f0a9f17" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedCustomerRelationshipsGross_019e0856-7a4d-7f75-b303-e0a9c8f36ad2" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedCustomerRelationshipsGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7728-a6e4-18a1937f8c3e" xlink:to="loc_us-gaap_FiniteLivedCustomerRelationshipsGross_019e0856-7a4d-7f75-b303-e0a9c8f36ad2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_019e0856-7a4d-7ae5-91c4-ef31d77fee02" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetUsefulLife"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4d-7728-a6e4-18a1937f8c3e" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetUsefulLife_019e0856-7a4d-7ae5-91c4-ef31d77fee02" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/GOODWILLANDINTANGIBLEASSETSSCHEDULEOFCHANGESINCARRYINGVALUEOFGOODWILLBYREPORTABLESEGMENTDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#GOODWILLANDINTANGIBLEASSETSSCHEDULEOFCHANGESINCARRYINGVALUEOFGOODWILLBYREPORTABLESEGMENTDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/GOODWILLANDINTANGIBLEASSETSSCHEDULEOFCHANGESINCARRYINGVALUEOFGOODWILLBYREPORTABLESEGMENTDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillLineItems_019e0856-7a4d-75fd-bd52-8d0c4d8fd7c7" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_GoodwillLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfGoodwillTable_019e0856-7a4d-7cda-95b6-3415cc8b12d4" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfGoodwillTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_GoodwillLineItems_019e0856-7a4d-75fd-bd52-8d0c4d8fd7c7" xlink:to="loc_us-gaap_ScheduleOfGoodwillTable_019e0856-7a4d-7cda-95b6-3415cc8b12d4" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsAxis_019e0856-7a4d-7d08-a694-01fdd3d2c0bd" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ConsolidationItemsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_019e0856-7a4d-7cda-95b6-3415cc8b12d4" xlink:to="loc_srt_ConsolidationItemsAxis_019e0856-7a4d-7d08-a694-01fdd3d2c0bd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_019e0856-7a4d-7d08-a694-01fdd3d2c0bd_default" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_019e0856-7a4d-7d08-a694-01fdd3d2c0bd" xlink:to="loc_srt_ConsolidationItemsDomain_019e0856-7a4d-7d08-a694-01fdd3d2c0bd_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_019e0856-7a4d-7a65-8af2-f1d50e6e3fce" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_019e0856-7a4d-7d08-a694-01fdd3d2c0bd" xlink:to="loc_srt_ConsolidationItemsDomain_019e0856-7a4d-7a65-8af2-f1d50e6e3fce" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingSegmentsMember_019e0856-7a4d-749e-9177-28ac16888cdc" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingSegmentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_019e0856-7a4d-7a65-8af2-f1d50e6e3fce" xlink:to="loc_us-gaap_OperatingSegmentsMember_019e0856-7a4d-749e-9177-28ac16888cdc" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_019e0856-7a4d-7fd0-b12c-d4e9a6b46872" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfGoodwillTable_019e0856-7a4d-7cda-95b6-3415cc8b12d4" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_019e0856-7a4d-7fd0-b12c-d4e9a6b46872" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_019e0856-7a4d-7fd0-b12c-d4e9a6b46872_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_019e0856-7a4d-7fd0-b12c-d4e9a6b46872" xlink:to="loc_us-gaap_SegmentDomain_019e0856-7a4d-7fd0-b12c-d4e9a6b46872_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_019e0856-7a4d-7dc4-9387-7104fd757916" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_019e0856-7a4d-7fd0-b12c-d4e9a6b46872" xlink:to="loc_us-gaap_SegmentDomain_019e0856-7a4d-7dc4-9387-7104fd757916" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_NorthAmericaConfectionerySegmentMember_019e0856-7a4d-7755-9351-cff52b9790ab" xlink:href="hsy-20260628.xsd#hsy_NorthAmericaConfectionerySegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_019e0856-7a4d-7dc4-9387-7104fd757916" xlink:to="loc_hsy_NorthAmericaConfectionerySegmentMember_019e0856-7a4d-7755-9351-cff52b9790ab" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_NorthAmericaSaltySnacksSegmentMember_019e0856-7a4d-72d9-991d-3e3200d18ea4" xlink:href="hsy-20260628.xsd#hsy_NorthAmericaSaltySnacksSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_019e0856-7a4d-7dc4-9387-7104fd757916" xlink:to="loc_hsy_NorthAmericaSaltySnacksSegmentMember_019e0856-7a4d-72d9-991d-3e3200d18ea4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_InternationalSegmentMember_019e0856-7a4d-7047-9a3c-48274f0ea697" xlink:href="hsy-20260628.xsd#hsy_InternationalSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_019e0856-7a4d-7dc4-9387-7104fd757916" xlink:to="loc_hsy_InternationalSegmentMember_019e0856-7a4d-7047-9a3c-48274f0ea697" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillRollForward_019e0856-7a4d-759e-b940-f4eb793f0072" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_GoodwillRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillLineItems_019e0856-7a4d-75fd-bd52-8d0c4d8fd7c7" xlink:to="loc_us-gaap_GoodwillRollForward_019e0856-7a4d-759e-b940-f4eb793f0072" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_019e0856-7a4d-7236-9f27-2c9d33b5339b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_Goodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_019e0856-7a4d-759e-b940-f4eb793f0072" xlink:to="loc_us-gaap_Goodwill_019e0856-7a4d-7236-9f27-2c9d33b5339b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillPurchaseAccountingAdjustments_019f80d8-9935-7bd6-958e-1ff194b7775e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_GoodwillPurchaseAccountingAdjustments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_019e0856-7a4d-759e-b940-f4eb793f0072" xlink:to="loc_us-gaap_GoodwillPurchaseAccountingAdjustments_019f80d8-9935-7bd6-958e-1ff194b7775e" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_GoodwillForeignCurrencyTranslationGainLoss_019e0856-7a4d-7bf0-8b8d-3b3b313fd910" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_GoodwillForeignCurrencyTranslationGainLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_GoodwillRollForward_019e0856-7a4d-759e-b940-f4eb793f0072" xlink:to="loc_us-gaap_GoodwillForeignCurrencyTranslationGainLoss_019e0856-7a4d-7bf0-8b8d-3b3b313fd910" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Goodwill_019e0856-7a4d-7942-a37a-d8bbb63bfcf0" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_Goodwill"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/GOODWILLANDINTANGIBLEASSETSSCHEDULEOFGROSSCARRYINGAMOUNTANDACCUMULATEDAMORTIZATIONFOREACHMAJORCLASSOFINTANGIBLEASSETDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#GOODWILLANDINTANGIBLEASSETSSCHEDULEOFGROSSCARRYINGAMOUNTANDACCUMULATEDAMORTIZATIONFOREACHMAJORCLASSOFINTANGIBLEASSETDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/GOODWILLANDINTANGIBLEASSETSSCHEDULEOFGROSSCARRYINGAMOUNTANDACCUMULATEDAMORTIZATIONFOREACHMAJORCLASSOFINTANGIBLEASSETDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_019e0856-7a4d-720d-a7de-4fd90ba0f0cc" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_019e0856-7a4d-7824-935e-27bdc307a7cb" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_019e0856-7a4d-720d-a7de-4fd90ba0f0cc" xlink:to="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_019e0856-7a4d-7824-935e-27bdc307a7cb" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_019e0856-7a4d-73af-96e9-cce3572d346b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_019e0856-7a4d-7824-935e-27bdc307a7cb" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_019e0856-7a4d-73af-96e9-cce3572d346b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-73af-96e9-cce3572d346b_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_019e0856-7a4d-73af-96e9-cce3572d346b" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-73af-96e9-cce3572d346b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-7b05-81bc-979d2959b22c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsByMajorClassAxis_019e0856-7a4d-73af-96e9-cce3572d346b" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-7b05-81bc-979d2959b22c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TrademarksMember_019e0856-7a4d-71e0-a6d4-795f9f443026" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_TrademarksMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-7b05-81bc-979d2959b22c" xlink:to="loc_us-gaap_TrademarksMember_019e0856-7a4d-71e0-a6d4-795f9f443026" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CustomerRelatedIntangibleAssetsMember_019e0856-7a4d-72a1-9294-16e70bb0fc39" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CustomerRelatedIntangibleAssetsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-7b05-81bc-979d2959b22c" xlink:to="loc_us-gaap_CustomerRelatedIntangibleAssetsMember_019e0856-7a4d-72a1-9294-16e70bb0fc39" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PatentsMember_019e0856-7a4d-7076-a0ed-52db1dcb410d" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_PatentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-7b05-81bc-979d2959b22c" xlink:to="loc_us-gaap_PatentsMember_019e0856-7a4d-7076-a0ed-52db1dcb410d" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_019e0856-7a4d-7a61-9d8a-36a7373335c1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfFiniteLivedIntangibleAssetsTable_019e0856-7a4d-7824-935e-27bdc307a7cb" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_019e0856-7a4d-7a61-9d8a-36a7373335c1" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-7a61-9d8a-36a7373335c1_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_019e0856-7a4d-7a61-9d8a-36a7373335c1" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-7a61-9d8a-36a7373335c1_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-7adc-8cdc-738e9646f95b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsByMajorClassAxis_019e0856-7a4d-7a61-9d8a-36a7373335c1" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-7adc-8cdc-738e9646f95b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TrademarksMember_019e0856-7a4d-7c78-ba7b-2b3115dd640f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_TrademarksMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IndefiniteLivedIntangibleAssetsMajorClassNameDomain_019e0856-7a4d-7adc-8cdc-738e9646f95b" xlink:to="loc_us-gaap_TrademarksMember_019e0856-7a4d-7c78-ba7b-2b3115dd640f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsGross_019e0856-7a4d-7bbc-8d3d-97fa2b5811d8" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_019e0856-7a4d-720d-a7de-4fd90ba0f0cc" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsGross_019e0856-7a4d-7bbc-8d3d-97fa2b5811d8" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_019e0856-7a4d-79cd-b92d-096437f03c1f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_019e0856-7a4d-720d-a7de-4fd90ba0f0cc" xlink:to="loc_us-gaap_FiniteLivedIntangibleAssetsAccumulatedAmortization_019e0856-7a4d-79cd-b92d-096437f03c1f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill_019e0856-7a4d-7448-8733-03de4fe2c921" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_019e0856-7a4d-720d-a7de-4fd90ba0f0cc" xlink:to="loc_us-gaap_IndefiniteLivedIntangibleAssetsExcludingGoodwill_019e0856-7a4d-7448-8733-03de4fe2c921" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_019e0856-7a4d-7351-a754-3ed1f20e00dc" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IntangibleAssetsNetExcludingGoodwill"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FiniteLivedIntangibleAssetsLineItems_019e0856-7a4d-720d-a7de-4fd90ba0f0cc" xlink:to="loc_us-gaap_IntangibleAssetsNetExcludingGoodwill_019e0856-7a4d-7351-a754-3ed1f20e00dc" xlink:type="arc" order="3"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSCHEDULEOFSHORTTERMDEBTDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#SHORTANDLONGTERMDEBTSCHEDULEOFSHORTTERMDEBTDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSCHEDULEOFSHORTTERMDEBTDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditFacilityLineItems_019e0856-7a4d-7f15-93a4-10f4f99e7951" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LineOfCreditFacilityLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditFacilityTable_019e0856-7a4d-7715-af42-7dd95c798510" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LineOfCreditFacilityTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_019e0856-7a4d-7f15-93a4-10f4f99e7951" xlink:to="loc_us-gaap_LineOfCreditFacilityTable_019e0856-7a4d-7715-af42-7dd95c798510" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CreditFacilityAxis_019e0856-7a4d-7839-93ad-325dd5710598" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CreditFacilityAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_019e0856-7a4d-7715-af42-7dd95c798510" xlink:to="loc_us-gaap_CreditFacilityAxis_019e0856-7a4d-7839-93ad-325dd5710598" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CreditFacilityDomain_019e0856-7a4d-7839-93ad-325dd5710598_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CreditFacilityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CreditFacilityAxis_019e0856-7a4d-7839-93ad-325dd5710598" xlink:to="loc_us-gaap_CreditFacilityDomain_019e0856-7a4d-7839-93ad-325dd5710598_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CreditFacilityDomain_019e0856-7a4d-7bb4-be57-71f8bf3808d6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CreditFacilityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CreditFacilityAxis_019e0856-7a4d-7839-93ad-325dd5710598" xlink:to="loc_us-gaap_CreditFacilityDomain_019e0856-7a4d-7bb4-be57-71f8bf3808d6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevolvingCreditFacilityMember_019e0856-7a4d-74a7-983d-0373c176be1d" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RevolvingCreditFacilityMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CreditFacilityDomain_019e0856-7a4d-7bb4-be57-71f8bf3808d6" xlink:to="loc_us-gaap_RevolvingCreditFacilityMember_019e0856-7a4d-74a7-983d-0373c176be1d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_019e0856-7a4d-7db2-9a62-fefe16788df5" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongtermDebtTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_019e0856-7a4d-7715-af42-7dd95c798510" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_019e0856-7a4d-7db2-9a62-fefe16788df5" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_019e0856-7a4d-7db2-9a62-fefe16788df5_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_019e0856-7a4d-7db2-9a62-fefe16788df5" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_019e0856-7a4d-7db2-9a62-fefe16788df5_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_019e0856-7a4d-72e2-b72b-8cba4e62313f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_019e0856-7a4d-7db2-9a62-fefe16788df5" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_019e0856-7a4d-72e2-b72b-8cba4e62313f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ForeignLineOfCreditMember_019e0856-7a4d-7da9-b322-426fca220d7f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ForeignLineOfCreditMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_019e0856-7a4d-72e2-b72b-8cba4e62313f" xlink:to="loc_us-gaap_ForeignLineOfCreditMember_019e0856-7a4d-7da9-b322-426fca220d7f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermDebtTypeAxis_019e0856-7a4d-76fb-97cc-0fee03bf7b9b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShortTermDebtTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_019e0856-7a4d-7715-af42-7dd95c798510" xlink:to="loc_us-gaap_ShortTermDebtTypeAxis_019e0856-7a4d-76fb-97cc-0fee03bf7b9b" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermDebtTypeDomain_019e0856-7a4d-76fb-97cc-0fee03bf7b9b_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShortTermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_ShortTermDebtTypeAxis_019e0856-7a4d-76fb-97cc-0fee03bf7b9b" xlink:to="loc_us-gaap_ShortTermDebtTypeDomain_019e0856-7a4d-76fb-97cc-0fee03bf7b9b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermDebtTypeDomain_019e0856-7a4d-7fc5-9e8f-262031dce102" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShortTermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_ShortTermDebtTypeAxis_019e0856-7a4d-76fb-97cc-0fee03bf7b9b" xlink:to="loc_us-gaap_ShortTermDebtTypeDomain_019e0856-7a4d-7fc5-9e8f-262031dce102" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommercialPaperMember_019e0856-7a4d-7553-a427-92f86e000ceb" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommercialPaperMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShortTermDebtTypeDomain_019e0856-7a4d-7fc5-9e8f-262031dce102" xlink:to="loc_us-gaap_CommercialPaperMember_019e0856-7a4d-7553-a427-92f86e000ceb" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LinesOfCreditCurrent_019e0856-7a4d-7450-81ad-8f2be3287bad" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LinesOfCreditCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_019e0856-7a4d-7f15-93a4-10f4f99e7951" xlink:to="loc_us-gaap_LinesOfCreditCurrent_019e0856-7a4d-7450-81ad-8f2be3287bad" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermBorrowings_019e0856-7a4d-79f3-888e-befafad47929" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShortTermBorrowings"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_019e0856-7a4d-7f15-93a4-10f4f99e7951" xlink:to="loc_us-gaap_ShortTermBorrowings_019e0856-7a4d-79f3-888e-befafad47929" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermDebtWeightedAverageInterestRate_019e0856-7a4d-7ee7-9249-c780febe130f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShortTermDebtWeightedAverageInterestRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_019e0856-7a4d-7f15-93a4-10f4f99e7951" xlink:to="loc_us-gaap_ShortTermDebtWeightedAverageInterestRate_019e0856-7a4d-7ee7-9249-c780febe130f" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSHORTTERMDEBTNARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#SHORTANDLONGTERMDEBTSHORTTERMDEBTNARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSHORTTERMDEBTNARRATIVEDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditFacilityLineItems_019e0856-7a4d-79e4-bf9c-2f87b3a98231" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LineOfCreditFacilityLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditFacilityTable_019e0856-7a4d-70c7-b724-b465e4fb1e4f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LineOfCreditFacilityTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_019e0856-7a4d-79e4-bf9c-2f87b3a98231" xlink:to="loc_us-gaap_LineOfCreditFacilityTable_019e0856-7a4d-70c7-b724-b465e4fb1e4f" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentAxis_019e0856-7a4d-7599-8e21-b9ea2da2609b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DebtInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_019e0856-7a4d-70c7-b724-b465e4fb1e4f" xlink:to="loc_us-gaap_DebtInstrumentAxis_019e0856-7a4d-7599-8e21-b9ea2da2609b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_019e0856-7a4d-7599-8e21-b9ea2da2609b_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_019e0856-7a4d-7599-8e21-b9ea2da2609b" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_019e0856-7a4d-7599-8e21-b9ea2da2609b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_019e0856-7a4d-72f7-91a4-eb8964a60574" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_019e0856-7a4d-7599-8e21-b9ea2da2609b" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_019e0856-7a4d-72f7-91a4-eb8964a60574" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditMember_019e0856-7a4d-7b9b-ace0-833208c33717" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LineOfCreditMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_019e0856-7a4d-72f7-91a4-eb8964a60574" xlink:to="loc_us-gaap_LineOfCreditMember_019e0856-7a4d-7b9b-ace0-833208c33717" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CreditFacilityAxis_019e0856-7a4d-7f3c-ad58-110546fc5116" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CreditFacilityAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_019e0856-7a4d-70c7-b724-b465e4fb1e4f" xlink:to="loc_us-gaap_CreditFacilityAxis_019e0856-7a4d-7f3c-ad58-110546fc5116" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CreditFacilityDomain_019e0856-7a4d-7f3c-ad58-110546fc5116_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CreditFacilityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CreditFacilityAxis_019e0856-7a4d-7f3c-ad58-110546fc5116" xlink:to="loc_us-gaap_CreditFacilityDomain_019e0856-7a4d-7f3c-ad58-110546fc5116_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CreditFacilityDomain_019e0856-7a4d-7dfb-828d-3100af5fb8f8" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CreditFacilityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CreditFacilityAxis_019e0856-7a4d-7f3c-ad58-110546fc5116" xlink:to="loc_us-gaap_CreditFacilityDomain_019e0856-7a4d-7dfb-828d-3100af5fb8f8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevolvingCreditFacilityMember_019e0856-7a4d-7e2a-8676-be93e895fd3a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RevolvingCreditFacilityMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CreditFacilityDomain_019e0856-7a4d-7dfb-828d-3100af5fb8f8" xlink:to="loc_us-gaap_RevolvingCreditFacilityMember_019e0856-7a4d-7e2a-8676-be93e895fd3a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_019e0856-7a4d-7f05-a171-08872487200c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongtermDebtTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LineOfCreditFacilityTable_019e0856-7a4d-70c7-b724-b465e4fb1e4f" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_019e0856-7a4d-7f05-a171-08872487200c" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_019e0856-7a4d-7f05-a171-08872487200c_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_019e0856-7a4d-7f05-a171-08872487200c" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_019e0856-7a4d-7f05-a171-08872487200c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_019e0856-7a4d-7b70-9967-4dd51f9f1189" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_019e0856-7a4d-7f05-a171-08872487200c" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_019e0856-7a4d-7b70-9967-4dd51f9f1189" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditMember_019e0856-7a4d-70ae-96a7-155f6179f4fc" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LineOfCreditMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_019e0856-7a4d-7b70-9967-4dd51f9f1189" xlink:to="loc_us-gaap_LineOfCreditMember_019e0856-7a4d-70ae-96a7-155f6179f4fc" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_019e0856-7a4d-7ab0-8aca-1ab281e6a557" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_019e0856-7a4d-79e4-bf9c-2f87b3a98231" xlink:to="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_019e0856-7a4d-7ab0-8aca-1ab281e6a557" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LineOfCreditFacilityAccordionFeatureIncreaseLimit_019e0856-7a4d-7524-8460-2920e3c4f95a" xlink:href="hsy-20260628.xsd#hsy_LineOfCreditFacilityAccordionFeatureIncreaseLimit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_019e0856-7a4d-79e4-bf9c-2f87b3a98231" xlink:to="loc_hsy_LineOfCreditFacilityAccordionFeatureIncreaseLimit_019e0856-7a4d-7524-8460-2920e3c4f95a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DebtTerminationDateNumberOfExtensionOption_019e0856-7a4d-71cc-ac76-90f785a2fb29" xlink:href="hsy-20260628.xsd#hsy_DebtTerminationDateNumberOfExtensionOption"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_019e0856-7a4d-79e4-bf9c-2f87b3a98231" xlink:to="loc_hsy_DebtTerminationDateNumberOfExtensionOption_019e0856-7a4d-71cc-ac76-90f785a2fb29" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DebtTerminationDateExtensionTerm_019e0856-7a4d-7ff4-bf76-2e8400fb3156" xlink:href="hsy-20260628.xsd#hsy_DebtTerminationDateExtensionTerm"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LineOfCreditFacilityLineItems_019e0856-7a4d-79e4-bf9c-2f87b3a98231" xlink:to="loc_hsy_DebtTerminationDateExtensionTerm_019e0856-7a4d-7ff4-bf76-2e8400fb3156" xlink:type="arc" order="3"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSCHEDULEOFLONGTERMDEBTINSTRUMENTSDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#SHORTANDLONGTERMDEBTSCHEDULEOFLONGTERMDEBTINSTRUMENTSDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SHORTANDLONGTERMDEBTSCHEDULEOFLONGTERMDEBTINSTRUMENTSDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentLineItems_019e0856-7a4d-7086-8dcd-bd27626979b6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DebtInstrumentLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentTable_019e0856-7a4d-73eb-8b19-8e7e151616e2" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DebtInstrumentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_019e0856-7a4d-7086-8dcd-bd27626979b6" xlink:to="loc_us-gaap_DebtInstrumentTable_019e0856-7a4d-73eb-8b19-8e7e151616e2" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_019e0856-7a4d-7f1d-a493-ae0d570fd7a0" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongtermDebtTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_019e0856-7a4d-73eb-8b19-8e7e151616e2" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_019e0856-7a4d-7f1d-a493-ae0d570fd7a0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_019e0856-7a4d-7f1d-a493-ae0d570fd7a0_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_019e0856-7a4d-7f1d-a493-ae0d570fd7a0" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_019e0856-7a4d-7f1d-a493-ae0d570fd7a0_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_019e0856-7a4d-7fa0-95e2-af573f07ea93" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_019e0856-7a4d-7f1d-a493-ae0d570fd7a0" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_019e0856-7a4d-7fa0-95e2-af573f07ea93" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DomesticCorporateDebtSecuritiesMember_019e0856-7a4d-723d-b9db-ae23b97ecaec" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DomesticCorporateDebtSecuritiesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_019e0856-7a4d-7fa0-95e2-af573f07ea93" xlink:to="loc_us-gaap_DomesticCorporateDebtSecuritiesMember_019e0856-7a4d-723d-b9db-ae23b97ecaec" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentAxis_019e0856-7a4d-7206-9e09-ffdfcaf88a9d" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DebtInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_019e0856-7a4d-73eb-8b19-8e7e151616e2" xlink:to="loc_us-gaap_DebtInstrumentAxis_019e0856-7a4d-7206-9e09-ffdfcaf88a9d" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_019e0856-7a4d-7206-9e09-ffdfcaf88a9d_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_019e0856-7a4d-7206-9e09-ffdfcaf88a9d" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_019e0856-7a4d-7206-9e09-ffdfcaf88a9d_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_019e0856-7a4d-7a37-9ec1-73047305ab36" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_019e0856-7a4d-7206-9e09-ffdfcaf88a9d" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_019e0856-7a4d-7a37-9ec1-73047305ab36" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes2.30Due2026Member_019e0856-7a4d-7690-befe-4c6a1ef8d049" xlink:href="hsy-20260628.xsd#hsy_Notes2.30Due2026Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_019e0856-7a4d-7a37-9ec1-73047305ab36" xlink:to="loc_hsy_Notes2.30Due2026Member_019e0856-7a4d-7690-befe-4c6a1ef8d049" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Debentures7.200Due2027Member_019e0856-7a4d-73f1-b10a-9c85f0ee455a" xlink:href="hsy-20260628.xsd#hsy_Debentures7.200Due2027Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_019e0856-7a4d-7a37-9ec1-73047305ab36" xlink:to="loc_hsy_Debentures7.200Due2027Member_019e0856-7a4d-73f1-b10a-9c85f0ee455a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes4.550Due2028Member_019e0856-7a4d-7d7b-beac-633434f2d79a" xlink:href="hsy-20260628.xsd#hsy_Notes4.550Due2028Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_019e0856-7a4d-7a37-9ec1-73047305ab36" xlink:to="loc_hsy_Notes4.550Due2028Member_019e0856-7a4d-7d7b-beac-633434f2d79a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes4250Due2028Member_019e0856-7a4d-7a8c-b3f8-8e8fe2aa7d7a" xlink:href="hsy-20260628.xsd#hsy_Notes4250Due2028Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_019e0856-7a4d-7a37-9ec1-73047305ab36" xlink:to="loc_hsy_Notes4250Due2028Member_019e0856-7a4d-7a8c-b3f8-8e8fe2aa7d7a" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes2.450Due2029Member_019e0856-7a4d-7433-ab50-ac5b60b6f061" xlink:href="hsy-20260628.xsd#hsy_Notes2.450Due2029Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_019e0856-7a4d-7a37-9ec1-73047305ab36" xlink:to="loc_hsy_Notes2.450Due2029Member_019e0856-7a4d-7433-ab50-ac5b60b6f061" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes4.750Due2030Member_019e0856-7a4d-70fc-8fa3-2a052117e873" xlink:href="hsy-20260628.xsd#hsy_Notes4.750Due2030Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_019e0856-7a4d-7a37-9ec1-73047305ab36" xlink:to="loc_hsy_Notes4.750Due2030Member_019e0856-7a4d-70fc-8fa3-2a052117e873" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes1700Due2030Member_019e0856-7a4d-7157-a771-84d01336eb42" xlink:href="hsy-20260628.xsd#hsy_Notes1700Due2030Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_019e0856-7a4d-7a37-9ec1-73047305ab36" xlink:to="loc_hsy_Notes1700Due2030Member_019e0856-7a4d-7157-a771-84d01336eb42" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes4.950Due2032Member_019e0856-7a4d-74fb-910a-0f0aa9fa628d" xlink:href="hsy-20260628.xsd#hsy_Notes4.950Due2032Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_019e0856-7a4d-7a37-9ec1-73047305ab36" xlink:to="loc_hsy_Notes4.950Due2032Member_019e0856-7a4d-74fb-910a-0f0aa9fa628d" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes4500Due2033Member_019e0856-7a4d-7a54-8ce7-20af72765a4f" xlink:href="hsy-20260628.xsd#hsy_Notes4500Due2033Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_019e0856-7a4d-7a37-9ec1-73047305ab36" xlink:to="loc_hsy_Notes4500Due2033Member_019e0856-7a4d-7a54-8ce7-20af72765a4f" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes5.100Due2035Member_019e0856-7a4d-7b8b-a3c2-3fe375a6ceb0" xlink:href="hsy-20260628.xsd#hsy_Notes5.100Due2035Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_019e0856-7a4d-7a37-9ec1-73047305ab36" xlink:to="loc_hsy_Notes5.100Due2035Member_019e0856-7a4d-7b8b-a3c2-3fe375a6ceb0" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes3.375Due2046Member_019e0856-7a4d-7c8a-aba0-4d76bc0eb8c4" xlink:href="hsy-20260628.xsd#hsy_Notes3.375Due2046Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_019e0856-7a4d-7a37-9ec1-73047305ab36" xlink:to="loc_hsy_Notes3.375Due2046Member_019e0856-7a4d-7c8a-aba0-4d76bc0eb8c4" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes3.125Due2049Member_019e0856-7a4d-7949-9216-e0b77ccc963a" xlink:href="hsy-20260628.xsd#hsy_Notes3.125Due2049Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_019e0856-7a4d-7a37-9ec1-73047305ab36" xlink:to="loc_hsy_Notes3.125Due2049Member_019e0856-7a4d-7949-9216-e0b77ccc963a" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_Notes2650Due2050Member_019e0856-7a4d-7526-9b3d-b17bf082a8e2" xlink:href="hsy-20260628.xsd#hsy_Notes2650Due2050Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_019e0856-7a4d-7a37-9ec1-73047305ab36" xlink:to="loc_hsy_Notes2650Due2050Member_019e0856-7a4d-7526-9b3d-b17bf082a8e2" xlink:type="arc" order="12"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiability_019e0856-7a4d-7109-a40a-202640f7c6c4" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FinanceLeaseLiability"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_019e0856-7a4d-7086-8dcd-bd27626979b6" xlink:to="loc_us-gaap_FinanceLeaseLiability_019e0856-7a4d-7109-a40a-202640f7c6c4" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DebtInstrumentImpactofDerivativesUnamortizedDiscountPremiumandDebtIssuanceCostsNet_019e0856-7a4d-7dc1-bed5-2581350e9814" xlink:href="hsy-20260628.xsd#hsy_DebtInstrumentImpactofDerivativesUnamortizedDiscountPremiumandDebtIssuanceCostsNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_019e0856-7a4d-7086-8dcd-bd27626979b6" xlink:to="loc_hsy_DebtInstrumentImpactofDerivativesUnamortizedDiscountPremiumandDebtIssuanceCostsNet_019e0856-7a4d-7dc1-bed5-2581350e9814" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_019e0856-7a4d-7690-875b-7b4be69011cf" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongTermDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_019e0856-7a4d-7086-8dcd-bd27626979b6" xlink:to="loc_us-gaap_LongTermDebt_019e0856-7a4d-7690-875b-7b4be69011cf" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtCurrent_019e0856-7a4d-786d-936e-4d7421cc2b7b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongTermDebtCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_019e0856-7a4d-7086-8dcd-bd27626979b6" xlink:to="loc_us-gaap_LongTermDebtCurrent_019e0856-7a4d-786d-936e-4d7421cc2b7b" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_019e0856-7a4d-7a29-9c27-ed5894749353" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongTermDebtNoncurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_019e0856-7a4d-7086-8dcd-bd27626979b6" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_019e0856-7a4d-7a29-9c27-ed5894749353" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_019e0856-7a4d-705b-80ff-20bed0ebc963" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DebtInstrumentInterestRateStatedPercentage"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_019e0856-7a4d-7086-8dcd-bd27626979b6" xlink:to="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_019e0856-7a4d-705b-80ff-20bed0ebc963" xlink:type="arc" order="5"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/DERIVATIVEINSTRUMENTSNARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#DERIVATIVEINSTRUMENTSNARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/DERIVATIVEINSTRUMENTSNARRATIVEDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLineItems_019e0856-7a4e-75b6-af71-e48ea910c66f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeTable_019e0856-7a4d-7515-b7c3-ed29452c3a75" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativeLineItems_019e0856-7a4e-75b6-af71-e48ea910c66f" xlink:to="loc_us-gaap_DerivativeTable_019e0856-7a4d-7515-b7c3-ed29452c3a75" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7a4d-7fd3-bacf-f0e307339114" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_019e0856-7a4d-7515-b7c3-ed29452c3a75" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7a4d-7fd3-bacf-f0e307339114" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4d-7fd3-bacf-f0e307339114_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7a4d-7fd3-bacf-f0e307339114" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4d-7fd3-bacf-f0e307339114_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-747a-95e7-9b4588e9e7c8" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7a4d-7fd3-bacf-f0e307339114" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-747a-95e7-9b4588e9e7c8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommodityContractMember_019e0856-7a4e-7d5f-825a-5edb2517e022" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommodityContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-747a-95e7-9b4588e9e7c8" xlink:to="loc_us-gaap_CommodityContractMember_019e0856-7a4e-7d5f-825a-5edb2517e022" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ForeignExchangeContractMember_019e0856-7a4e-7552-84d0-b35dd5229c0a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ForeignExchangeContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-747a-95e7-9b4588e9e7c8" xlink:to="loc_us-gaap_ForeignExchangeContractMember_019e0856-7a4e-7552-84d0-b35dd5229c0a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySwapMember_019e0856-7a4e-7ef6-bfab-be3648a190b9" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EquitySwapMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-747a-95e7-9b4588e9e7c8" xlink:to="loc_us-gaap_EquitySwapMember_019e0856-7a4e-7ef6-bfab-be3648a190b9" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationAxis_019e0856-7a4e-7cc7-bec8-f087dacb183f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_HedgingDesignationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_019e0856-7a4d-7515-b7c3-ed29452c3a75" xlink:to="loc_us-gaap_HedgingDesignationAxis_019e0856-7a4e-7cc7-bec8-f087dacb183f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationDomain_019e0856-7a4e-7cc7-bec8-f087dacb183f_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_HedgingDesignationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_HedgingDesignationAxis_019e0856-7a4e-7cc7-bec8-f087dacb183f" xlink:to="loc_us-gaap_HedgingDesignationDomain_019e0856-7a4e-7cc7-bec8-f087dacb183f_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationDomain_019e0856-7a4e-7c2a-8f32-df306d70ae4f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_HedgingDesignationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_HedgingDesignationAxis_019e0856-7a4e-7cc7-bec8-f087dacb183f" xlink:to="loc_us-gaap_HedgingDesignationDomain_019e0856-7a4e-7c2a-8f32-df306d70ae4f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NondesignatedMember_019e0856-7a4e-7321-8d0d-e836e10e0501" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_NondesignatedMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_019e0856-7a4e-7c2a-8f32-df306d70ae4f" xlink:to="loc_us-gaap_NondesignatedMember_019e0856-7a4e-7321-8d0d-e836e10e0501" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DesignatedAsHedgingInstrumentMember_019e0856-7a4e-7303-90f0-f46c99b7efb1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DesignatedAsHedgingInstrumentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_019e0856-7a4e-7c2a-8f32-df306d70ae4f" xlink:to="loc_us-gaap_DesignatedAsHedgingInstrumentMember_019e0856-7a4e-7303-90f0-f46c99b7efb1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_019e0856-7a4e-7cc0-b918-425fc9c00ec0" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_019e0856-7a4d-7515-b7c3-ed29452c3a75" xlink:to="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_019e0856-7a4e-7cc0-b918-425fc9c00ec0" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingRelationshipDomain_019e0856-7a4e-7cc0-b918-425fc9c00ec0_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_HedgingRelationshipDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_019e0856-7a4e-7cc0-b918-425fc9c00ec0" xlink:to="loc_us-gaap_HedgingRelationshipDomain_019e0856-7a4e-7cc0-b918-425fc9c00ec0_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingRelationshipDomain_019e0856-7a4e-7c9f-9ca1-104fb7e3e7d4" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_HedgingRelationshipDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_019e0856-7a4e-7cc0-b918-425fc9c00ec0" xlink:to="loc_us-gaap_HedgingRelationshipDomain_019e0856-7a4e-7c9f-9ca1-104fb7e3e7d4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashFlowHedgingMember_019e0856-7a4e-796a-bd64-ddaab4cf5ec0" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CashFlowHedgingMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingRelationshipDomain_019e0856-7a4e-7c9f-9ca1-104fb7e3e7d4" xlink:to="loc_us-gaap_CashFlowHedgingMember_019e0856-7a4e-796a-bd64-ddaab4cf5ec0" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_019e0856-7a4e-7796-98cc-eaf95794602b" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_019e0856-7a4d-7515-b7c3-ed29452c3a75" xlink:to="loc_srt_RangeAxis_019e0856-7a4e-7796-98cc-eaf95794602b" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_019e0856-7a4e-7796-98cc-eaf95794602b_default" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_019e0856-7a4e-7796-98cc-eaf95794602b" xlink:to="loc_srt_RangeMember_019e0856-7a4e-7796-98cc-eaf95794602b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_019e0856-7a4e-77cc-8ea0-67099e0df00a" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_019e0856-7a4e-7796-98cc-eaf95794602b" xlink:to="loc_srt_RangeMember_019e0856-7a4e-77cc-8ea0-67099e0df00a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_019e0856-7a4e-7681-bcf4-45691066731e" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_019e0856-7a4e-77cc-8ea0-67099e0df00a" xlink:to="loc_srt_MinimumMember_019e0856-7a4e-7681-bcf4-45691066731e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_019e0856-7a4e-775b-9616-0f9863b52068" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_019e0856-7a4e-77cc-8ea0-67099e0df00a" xlink:to="loc_srt_MaximumMember_019e0856-7a4e-775b-9616-0f9863b52068" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeTermOfContract_019e0856-7a4e-738d-86a7-0962db66530d" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeTermOfContract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_019e0856-7a4e-75b6-af71-e48ea910c66f" xlink:to="loc_us-gaap_DerivativeTermOfContract_019e0856-7a4e-738d-86a7-0962db66530d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeNotionalAmount_019e0856-7a4e-7dee-8607-2139614c5e1b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeNotionalAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_019e0856-7a4e-75b6-af71-e48ea910c66f" xlink:to="loc_us-gaap_DerivativeNotionalAmount_019e0856-7a4e-7dee-8607-2139614c5e1b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_MinimumLengthofTimeHedgedinCashFlowHedge_019e0856-7a4e-7475-9155-0610f169e78b" xlink:href="hsy-20260628.xsd#hsy_MinimumLengthofTimeHedgedinCashFlowHedge"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_019e0856-7a4e-75b6-af71-e48ea910c66f" xlink:to="loc_hsy_MinimumLengthofTimeHedgedinCashFlowHedge_019e0856-7a4e-7475-9155-0610f169e78b" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MaximumLengthOfTimeHedgedInCashFlowHedge1_019e0856-7a4e-7afe-9673-883f0a17266c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_MaximumLengthOfTimeHedgedInCashFlowHedge1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_019e0856-7a4e-75b6-af71-e48ea910c66f" xlink:to="loc_us-gaap_MaximumLengthOfTimeHedgedInCashFlowHedge1_019e0856-7a4e-7afe-9673-883f0a17266c" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashFlowHedgeGainLossToBeReclassifiedWithinTwelveMonths_019e0856-7a4e-7909-83a4-62a9fdd0cfa0" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CashFlowHedgeGainLossToBeReclassifiedWithinTwelveMonths"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_019e0856-7a4e-75b6-af71-e48ea910c66f" xlink:to="loc_us-gaap_CashFlowHedgeGainLossToBeReclassifiedWithinTwelveMonths_019e0856-7a4e-7909-83a4-62a9fdd0cfa0" xlink:type="arc" order="4"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/DERIVATIVEINSTRUMENTSSCHEDULEOFTHECLASSIFICATIONOFDERIVATIVEASSETSANDLIABILITIESWITHINTHECONSOLIDATEDBALANCESHEETSDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#DERIVATIVEINSTRUMENTSSCHEDULEOFTHECLASSIFICATIONOFDERIVATIVEASSETSANDLIABILITIESWITHINTHECONSOLIDATEDBALANCESHEETSDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/DERIVATIVEINSTRUMENTSSCHEDULEOFTHECLASSIFICATIONOFDERIVATIVEASSETSANDLIABILITIESWITHINTHECONSOLIDATEDBALANCESHEETSDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativesFairValueLineItems_019e0856-7a4e-76ab-beaf-bc71c2460777" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativesFairValueLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable_019e0856-7a4e-7d1a-bf12-0ee0b4af8b89" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativesFairValueLineItems_019e0856-7a4e-76ab-beaf-bc71c2460777" xlink:to="loc_us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable_019e0856-7a4e-7d1a-bf12-0ee0b4af8b89" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationAxis_019e0856-7a4e-70e6-a3ba-658db1c1ff94" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_HedgingDesignationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable_019e0856-7a4e-7d1a-bf12-0ee0b4af8b89" xlink:to="loc_us-gaap_HedgingDesignationAxis_019e0856-7a4e-70e6-a3ba-658db1c1ff94" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationDomain_019e0856-7a4e-70e6-a3ba-658db1c1ff94_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_HedgingDesignationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_HedgingDesignationAxis_019e0856-7a4e-70e6-a3ba-658db1c1ff94" xlink:to="loc_us-gaap_HedgingDesignationDomain_019e0856-7a4e-70e6-a3ba-658db1c1ff94_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationDomain_019e0856-7a4e-742b-9461-fbc4b5fbf557" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_HedgingDesignationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_HedgingDesignationAxis_019e0856-7a4e-70e6-a3ba-658db1c1ff94" xlink:to="loc_us-gaap_HedgingDesignationDomain_019e0856-7a4e-742b-9461-fbc4b5fbf557" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DesignatedAsHedgingInstrumentMember_019e0856-7a4e-7885-8ae7-34e467ffa004" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DesignatedAsHedgingInstrumentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_019e0856-7a4e-742b-9461-fbc4b5fbf557" xlink:to="loc_us-gaap_DesignatedAsHedgingInstrumentMember_019e0856-7a4e-7885-8ae7-34e467ffa004" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NondesignatedMember_019e0856-7a4e-7fde-87bc-cdf3676ea8d4" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_NondesignatedMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_019e0856-7a4e-742b-9461-fbc4b5fbf557" xlink:to="loc_us-gaap_NondesignatedMember_019e0856-7a4e-7fde-87bc-cdf3676ea8d4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_019e0856-7a4e-7eff-bf9b-d7d7f903bd19" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable_019e0856-7a4e-7d1a-bf12-0ee0b4af8b89" xlink:to="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_019e0856-7a4e-7eff-bf9b-d7d7f903bd19" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingRelationshipDomain_019e0856-7a4e-7eff-bf9b-d7d7f903bd19_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_HedgingRelationshipDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_019e0856-7a4e-7eff-bf9b-d7d7f903bd19" xlink:to="loc_us-gaap_HedgingRelationshipDomain_019e0856-7a4e-7eff-bf9b-d7d7f903bd19_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingRelationshipDomain_019e0856-7a4e-7b46-add4-42e47a48bb17" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_HedgingRelationshipDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_019e0856-7a4e-7eff-bf9b-d7d7f903bd19" xlink:to="loc_us-gaap_HedgingRelationshipDomain_019e0856-7a4e-7b46-add4-42e47a48bb17" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashFlowHedgingMember_019e0856-7a4e-76f9-85a4-0684af250c27" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CashFlowHedgingMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingRelationshipDomain_019e0856-7a4e-7b46-add4-42e47a48bb17" xlink:to="loc_us-gaap_CashFlowHedgingMember_019e0856-7a4e-76f9-85a4-0684af250c27" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7a4e-7389-b150-a4c8f86471cd" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValuesDerivativesBalanceSheetLocationByDerivativeContractTypeByHedgingDesignationTable_019e0856-7a4e-7d1a-bf12-0ee0b4af8b89" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7a4e-7389-b150-a4c8f86471cd" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-7389-b150-a4c8f86471cd_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7a4e-7389-b150-a4c8f86471cd" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-7389-b150-a4c8f86471cd_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-7329-add2-13ab0a6ffa67" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7a4e-7389-b150-a4c8f86471cd" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-7329-add2-13ab0a6ffa67" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ForeignExchangeContractMember_019e0856-7a4e-7e41-b207-df4e394103bf" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ForeignExchangeContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-7329-add2-13ab0a6ffa67" xlink:to="loc_us-gaap_ForeignExchangeContractMember_019e0856-7a4e-7e41-b207-df4e394103bf" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommodityContractMember_019e0856-7a4e-7daf-b633-9f962bb1550a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommodityContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-7329-add2-13ab0a6ffa67" xlink:to="loc_us-gaap_CommodityContractMember_019e0856-7a4e-7daf-b633-9f962bb1550a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySwapMember_019e0856-7a4e-74dd-afcd-8d99eab2a495" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EquitySwapMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-7329-add2-13ab0a6ffa67" xlink:to="loc_us-gaap_EquitySwapMember_019e0856-7a4e-74dd-afcd-8d99eab2a495" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssets_019e0856-7a4e-7eef-bc6b-00b09ac93207" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativesFairValueLineItems_019e0856-7a4e-76ab-beaf-bc71c2460777" xlink:to="loc_us-gaap_DerivativeAssets_019e0856-7a4e-7eef-bc6b-00b09ac93207" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilities_019e0856-7a4e-794c-8af1-bc34504a027f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeLiabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativesFairValueLineItems_019e0856-7a4e-76ab-beaf-bc71c2460777" xlink:to="loc_us-gaap_DerivativeLiabilities_019e0856-7a4e-794c-8af1-bc34504a027f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DerivativeAssetCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading_019e0856-7a4e-7c02-905d-cc06c190c000" xlink:href="hsy-20260628.xsd#hsy_DerivativeAssetCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativesFairValueLineItems_019e0856-7a4e-76ab-beaf-bc71c2460777" xlink:to="loc_hsy_DerivativeAssetCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading_019e0856-7a4e-7c02-905d-cc06c190c000" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DerivativeLiabilityCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading_019e0856-7a4e-761f-817c-fbcf025756c8" xlink:href="hsy-20260628.xsd#hsy_DerivativeLiabilityCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativesFairValueLineItems_019e0856-7a4e-76ab-beaf-bc71c2460777" xlink:to="loc_hsy_DerivativeLiabilityCashTransfersReceivablePayableChangeInQuotedMarketPricesOnTheLastDayOfTrading_019e0856-7a4e-761f-817c-fbcf025756c8" xlink:type="arc" order="3"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/DERIVATIVEINSTRUMENTSSCHEDULEOFTHEEFFECTOFDERIVATIVEINSTRUMENTSONTHECONSOLIDATEDSTATEMENTSOFINCOMEDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#DERIVATIVEINSTRUMENTSSCHEDULEOFTHEEFFECTOFDERIVATIVEINSTRUMENTSONTHECONSOLIDATEDSTATEMENTSOFINCOMEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/DERIVATIVEINSTRUMENTSSCHEDULEOFTHEEFFECTOFDERIVATIVEINSTRUMENTSONTHECONSOLIDATEDSTATEMENTSOFINCOMEDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLineItems_019e0856-7a4e-7428-94ef-c375fe3139df" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeTable_019e0856-7a4e-7458-bf58-4f75df9d8407" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativeLineItems_019e0856-7a4e-7428-94ef-c375fe3139df" xlink:to="loc_us-gaap_DerivativeTable_019e0856-7a4e-7458-bf58-4f75df9d8407" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationAxis_019e0856-7a4e-7455-88eb-d2c7782af03f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_HedgingDesignationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_019e0856-7a4e-7458-bf58-4f75df9d8407" xlink:to="loc_us-gaap_HedgingDesignationAxis_019e0856-7a4e-7455-88eb-d2c7782af03f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationDomain_019e0856-7a4e-7455-88eb-d2c7782af03f_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_HedgingDesignationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_HedgingDesignationAxis_019e0856-7a4e-7455-88eb-d2c7782af03f" xlink:to="loc_us-gaap_HedgingDesignationDomain_019e0856-7a4e-7455-88eb-d2c7782af03f_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationDomain_019e0856-7a4e-7c3f-8449-ae83230ff03f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_HedgingDesignationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_HedgingDesignationAxis_019e0856-7a4e-7455-88eb-d2c7782af03f" xlink:to="loc_us-gaap_HedgingDesignationDomain_019e0856-7a4e-7c3f-8449-ae83230ff03f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DesignatedAsHedgingInstrumentMember_019e0856-7a4e-7c37-a366-7832d5de08e5" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DesignatedAsHedgingInstrumentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_019e0856-7a4e-7c3f-8449-ae83230ff03f" xlink:to="loc_us-gaap_DesignatedAsHedgingInstrumentMember_019e0856-7a4e-7c37-a366-7832d5de08e5" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_019e0856-7a4e-7168-8cae-e053665ab8fc" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_019e0856-7a4e-7458-bf58-4f75df9d8407" xlink:to="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_019e0856-7a4e-7168-8cae-e053665ab8fc" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingRelationshipDomain_019e0856-7a4e-7168-8cae-e053665ab8fc_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_HedgingRelationshipDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_019e0856-7a4e-7168-8cae-e053665ab8fc" xlink:to="loc_us-gaap_HedgingRelationshipDomain_019e0856-7a4e-7168-8cae-e053665ab8fc_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingRelationshipDomain_019e0856-7a4e-7d7e-9f3d-b2893a71d736" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_HedgingRelationshipDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentsGainLossByHedgingRelationshipAxis_019e0856-7a4e-7168-8cae-e053665ab8fc" xlink:to="loc_us-gaap_HedgingRelationshipDomain_019e0856-7a4e-7d7e-9f3d-b2893a71d736" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashFlowHedgingMember_019e0856-7a4e-7dac-b3a6-754a3f0938dc" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CashFlowHedgingMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingRelationshipDomain_019e0856-7a4e-7d7e-9f3d-b2893a71d736" xlink:to="loc_us-gaap_CashFlowHedgingMember_019e0856-7a4e-7dac-b3a6-754a3f0938dc" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7a4e-738e-a458-62ad5b878a1e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_019e0856-7a4e-7458-bf58-4f75df9d8407" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7a4e-738e-a458-62ad5b878a1e" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-738e-a458-62ad5b878a1e_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7a4e-738e-a458-62ad5b878a1e" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-738e-a458-62ad5b878a1e_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-77ad-b444-160edfde1e19" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7a4e-738e-a458-62ad5b878a1e" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-77ad-b444-160edfde1e19" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommodityContractMember_019e0856-7a4e-78af-a686-eada55b5b07f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommodityContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-77ad-b444-160edfde1e19" xlink:to="loc_us-gaap_CommodityContractMember_019e0856-7a4e-78af-a686-eada55b5b07f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ForeignExchangeContractMember_019e0856-7a4e-7cd8-ac02-dd9c6964cdd1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ForeignExchangeContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-77ad-b444-160edfde1e19" xlink:to="loc_us-gaap_ForeignExchangeContractMember_019e0856-7a4e-7cd8-ac02-dd9c6964cdd1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestRateContractMember_019e0856-7a4e-7baf-b14c-bc7438113c5f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_InterestRateContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-77ad-b444-160edfde1e19" xlink:to="loc_us-gaap_InterestRateContractMember_019e0856-7a4e-7baf-b14c-bc7438113c5f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySwapMember_019e0856-7a4e-77e8-bfb8-aa2ac1a105d4" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EquitySwapMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-77ad-b444-160edfde1e19" xlink:to="loc_us-gaap_EquitySwapMember_019e0856-7a4e-77e8-bfb8-aa2ac1a105d4" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentsNotDesignatedAsHedgingInstrumentsGainLossNet_019e0856-7a4e-7359-ac6f-4a001e21d396" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeInstrumentsNotDesignatedAsHedgingInstrumentsGainLossNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_019e0856-7a4e-7428-94ef-c375fe3139df" xlink:to="loc_us-gaap_DerivativeInstrumentsNotDesignatedAsHedgingInstrumentsGainLossNet_019e0856-7a4e-7359-ac6f-4a001e21d396" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_019e0856-7a4e-7e0d-b878-6e01d26ce390" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_019e0856-7a4e-7428-94ef-c375fe3139df" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAndTax_019e0856-7a4e-7e0d-b878-6e01d26ce390" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodBeforeTax_019e0856-7a4e-740a-ab40-2e78e2a9424a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodBeforeTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_019e0856-7a4e-7428-94ef-c375fe3139df" xlink:to="loc_us-gaap_ReclassificationFromAccumulatedOtherComprehensiveIncomeCurrentPeriodBeforeTax_019e0856-7a4e-740a-ab40-2e78e2a9424a" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/FAIRVALUEMEASUREMENTSNARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#FAIRVALUEMEASUREMENTSNARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/FAIRVALUEMEASUREMENTSNARRATIVEDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_019e0856-7a4e-75ec-a96d-5b1ffb787c1a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByBalanceSheetGroupingTable_019e0856-7a4e-7052-a2c3-70c2f247f306" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValueByBalanceSheetGroupingTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_019e0856-7a4e-75ec-a96d-5b1ffb787c1a" xlink:to="loc_us-gaap_FairValueByBalanceSheetGroupingTable_019e0856-7a4e-7052-a2c3-70c2f247f306" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_019e0856-7a4e-7287-b919-38da14ba3cd1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueByBalanceSheetGroupingTable_019e0856-7a4e-7052-a2c3-70c2f247f306" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_019e0856-7a4e-7287-b919-38da14ba3cd1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_019e0856-7a4e-7287-b919-38da14ba3cd1_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_019e0856-7a4e-7287-b919-38da14ba3cd1" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_019e0856-7a4e-7287-b919-38da14ba3cd1_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_019e0856-7a4e-70f3-a251-8edc0f5c7574" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_019e0856-7a4e-7287-b919-38da14ba3cd1" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_019e0856-7a4e-70f3-a251-8edc0f5c7574" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel3Member_019e0856-7a4e-7453-a35e-7a25e2044ea0" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValueInputsLevel3Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_019e0856-7a4e-70f3-a251-8edc0f5c7574" xlink:to="loc_us-gaap_FairValueInputsLevel3Member_019e0856-7a4e-7453-a35e-7a25e2044ea0" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueNetAssetLiability_019e0856-7a4e-7f6d-a2e0-009ecc347089" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValueNetAssetLiability"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_019e0856-7a4e-75ec-a96d-5b1ffb787c1a" xlink:to="loc_us-gaap_FairValueNetAssetLiability_019e0856-7a4e-7f6d-a2e0-009ecc347089" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/FAIRVALUEMEASUREMENTSSCHEDULEOFASSETSANDLIABILITIESMEASUREDATFAIRVALUEDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#FAIRVALUEMEASUREMENTSSCHEDULEOFASSETSANDLIABILITIESMEASUREDATFAIRVALUEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/FAIRVALUEMEASUREMENTSSCHEDULEOFASSETSANDLIABILITIESMEASUREDATFAIRVALUEDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_019e0856-7a4e-7480-bc09-f4fa7c0ec38c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByBalanceSheetGroupingTable_019e0856-7a4e-7141-b2c7-5852f50f1eb6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValueByBalanceSheetGroupingTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_019e0856-7a4e-7480-bc09-f4fa7c0ec38c" xlink:to="loc_us-gaap_FairValueByBalanceSheetGroupingTable_019e0856-7a4e-7141-b2c7-5852f50f1eb6" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7a4e-75db-b042-85c5c2420fd5" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueByBalanceSheetGroupingTable_019e0856-7a4e-7141-b2c7-5852f50f1eb6" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7a4e-75db-b042-85c5c2420fd5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-75db-b042-85c5c2420fd5_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7a4e-75db-b042-85c5c2420fd5" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-75db-b042-85c5c2420fd5_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-76dc-a8d8-ed61453cd9ea" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7a4e-75db-b042-85c5c2420fd5" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-76dc-a8d8-ed61453cd9ea" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ForeignExchangeContractMember_019e0856-7a4e-7fb4-af05-aaf5c2e0148c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ForeignExchangeContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-76dc-a8d8-ed61453cd9ea" xlink:to="loc_us-gaap_ForeignExchangeContractMember_019e0856-7a4e-7fb4-af05-aaf5c2e0148c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquitySwapMember_019e0856-7a4e-7c34-b297-aa321f244cb4" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EquitySwapMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-76dc-a8d8-ed61453cd9ea" xlink:to="loc_us-gaap_EquitySwapMember_019e0856-7a4e-7c34-b297-aa321f244cb4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommodityContractMember_019e0856-7a4e-7ad1-95ff-32a31a6b006a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommodityContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7a4e-76dc-a8d8-ed61453cd9ea" xlink:to="loc_us-gaap_CommodityContractMember_019e0856-7a4e-7ad1-95ff-32a31a6b006a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_019e0856-7a4e-7c3d-9b73-b4e0b714014f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueByBalanceSheetGroupingTable_019e0856-7a4e-7141-b2c7-5852f50f1eb6" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_019e0856-7a4e-7c3d-9b73-b4e0b714014f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_019e0856-7a4e-7c3d-9b73-b4e0b714014f_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_019e0856-7a4e-7c3d-9b73-b4e0b714014f" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_019e0856-7a4e-7c3d-9b73-b4e0b714014f_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_019e0856-7a4e-70a6-9368-4697c4a5cd27" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_019e0856-7a4e-7c3d-9b73-b4e0b714014f" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_019e0856-7a4e-70a6-9368-4697c4a5cd27" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel1Member_019e0856-7a4e-7aab-bb33-9e82a21c3ad6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValueInputsLevel1Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_019e0856-7a4e-70a6-9368-4697c4a5cd27" xlink:to="loc_us-gaap_FairValueInputsLevel1Member_019e0856-7a4e-7aab-bb33-9e82a21c3ad6" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel2Member_019e0856-7a4e-7005-9604-cc7534414925" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValueInputsLevel2Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_019e0856-7a4e-70a6-9368-4697c4a5cd27" xlink:to="loc_us-gaap_FairValueInputsLevel2Member_019e0856-7a4e-7005-9604-cc7534414925" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel3Member_019e0856-7a4e-7c5b-8d84-f8a283174e03" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValueInputsLevel3Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_019e0856-7a4e-70a6-9368-4697c4a5cd27" xlink:to="loc_us-gaap_FairValueInputsLevel3Member_019e0856-7a4e-7c5b-8d84-f8a283174e03" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeAssets_019e0856-7a4e-7973-949a-ad107974bb07" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_019e0856-7a4e-7480-bc09-f4fa7c0ec38c" xlink:to="loc_us-gaap_DerivativeAssets_019e0856-7a4e-7973-949a-ad107974bb07" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLiabilities_019e0856-7a4e-7a39-a5fd-837db6de0019" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeLiabilities"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems_019e0856-7a4e-7480-bc09-f4fa7c0ec38c" xlink:to="loc_us-gaap_DerivativeLiabilities_019e0856-7a4e-7a39-a5fd-837db6de0019" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/FAIRVALUEMEASUREMENTSSCHEDULEOFFAIRVALUESANDCARRYINGVALUESOFLONGTERMDEBTDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#FAIRVALUEMEASUREMENTSSCHEDULEOFFAIRVALUESANDCARRYINGVALUESOFLONGTERMDEBTDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/FAIRVALUEMEASUREMENTSSCHEDULEOFFAIRVALUESANDCARRYINGVALUESOFLONGTERMDEBTDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_019e0856-7a4e-7bb3-9029-40833308f2b3" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_019e0856-7a4e-71ac-ae46-54e0185c0a5a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_019e0856-7a4e-7bb3-9029-40833308f2b3" xlink:to="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_019e0856-7a4e-71ac-ae46-54e0185c0a5a" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_019e0856-7a4e-7a8b-a864-e31ed73ad16a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValueByFairValueHierarchyLevelAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisTable_019e0856-7a4e-71ac-ae46-54e0185c0a5a" xlink:to="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_019e0856-7a4e-7a8b-a864-e31ed73ad16a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_019e0856-7a4e-7a8b-a864-e31ed73ad16a_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_019e0856-7a4e-7a8b-a864-e31ed73ad16a" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_019e0856-7a4e-7a8b-a864-e31ed73ad16a_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_019e0856-7a4e-7cc3-a229-53ca7ed15d87" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValueMeasurementsFairValueHierarchyDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FairValueByFairValueHierarchyLevelAxis_019e0856-7a4e-7a8b-a864-e31ed73ad16a" xlink:to="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_019e0856-7a4e-7cc3-a229-53ca7ed15d87" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FairValueInputsLevel2Member_019e0856-7a4e-7454-88ff-6aea00a607ef" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FairValueInputsLevel2Member"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueMeasurementsFairValueHierarchyDomain_019e0856-7a4e-7cc3-a229-53ca7ed15d87" xlink:to="loc_us-gaap_FairValueInputsLevel2Member_019e0856-7a4e-7454-88ff-6aea00a607ef" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LongtermDebtCurrentMaturitiesFairValue_019e0856-7a4e-7644-a96c-ef733469f552" xlink:href="hsy-20260628.xsd#hsy_LongtermDebtCurrentMaturitiesFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_019e0856-7a4e-7bb3-9029-40833308f2b3" xlink:to="loc_hsy_LongtermDebtCurrentMaturitiesFairValue_019e0856-7a4e-7644-a96c-ef733469f552" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LongtermDebtExcludingCurrentMaturitiesFairValue_019e0856-7a4e-7b97-8886-732fa48d6c96" xlink:href="hsy-20260628.xsd#hsy_LongtermDebtExcludingCurrentMaturitiesFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_019e0856-7a4e-7bb3-9029-40833308f2b3" xlink:to="loc_hsy_LongtermDebtExcludingCurrentMaturitiesFairValue_019e0856-7a4e-7b97-8886-732fa48d6c96" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtFairValue_019e0856-7a4e-7af5-9c89-17e814204fe6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongTermDebtFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_019e0856-7a4e-7bb3-9029-40833308f2b3" xlink:to="loc_us-gaap_LongTermDebtFairValue_019e0856-7a4e-7af5-9c89-17e814204fe6" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtCurrent_019e0856-7a4e-78b5-9e54-d1137655cb07" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongTermDebtCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_019e0856-7a4e-7bb3-9029-40833308f2b3" xlink:to="loc_us-gaap_LongTermDebtCurrent_019e0856-7a4e-78b5-9e54-d1137655cb07" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtNoncurrent_019e0856-7a4e-76e4-a011-099c04948101" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongTermDebtNoncurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_019e0856-7a4e-7bb3-9029-40833308f2b3" xlink:to="loc_us-gaap_LongTermDebtNoncurrent_019e0856-7a4e-76e4-a011-099c04948101" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_019e0856-7a4e-7aa0-a2f9-4ef49d75af2e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LongTermDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_FairValueAssetsAndLiabilitiesMeasuredOnRecurringAndNonrecurringBasisLineItems_019e0856-7a4e-7bb3-9029-40833308f2b3" xlink:to="loc_us-gaap_LongTermDebt_019e0856-7a4e-7aa0-a2f9-4ef49d75af2e" xlink:type="arc" order="5"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/LEASESSUPPLEMENTALBALANCESHEETINFORMATIONRELATEDTOLEASESDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#LEASESSUPPLEMENTALBALANCESHEETINFORMATIONRELATEDTOLEASESDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/LEASESSUPPLEMENTALBALANCESHEETINFORMATIONRELATEDTOLEASESDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeLeaseDescriptionLineItems_019e0856-7a4e-7208-86a3-5daa030bdb7a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LesseeLeaseDescriptionLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeLeaseDescriptionTable_019e0856-7a4e-7ffd-8193-cde2fb41c6e6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LesseeLeaseDescriptionTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_019e0856-7a4e-7208-86a3-5daa030bdb7a" xlink:to="loc_us-gaap_LesseeLeaseDescriptionTable_019e0856-7a4e-7ffd-8193-cde2fb41c6e6" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BalanceSheetLocationAxis_019e0856-7a4e-7bd9-b3a4-907c99cfa0e2" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BalanceSheetLocationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LesseeLeaseDescriptionTable_019e0856-7a4e-7ffd-8193-cde2fb41c6e6" xlink:to="loc_us-gaap_BalanceSheetLocationAxis_019e0856-7a4e-7bd9-b3a4-907c99cfa0e2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BalanceSheetLocationDomain_019e0856-7a4e-7bd9-b3a4-907c99cfa0e2_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BalanceSheetLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BalanceSheetLocationAxis_019e0856-7a4e-7bd9-b3a4-907c99cfa0e2" xlink:to="loc_us-gaap_BalanceSheetLocationDomain_019e0856-7a4e-7bd9-b3a4-907c99cfa0e2_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BalanceSheetLocationDomain_019e0856-7a4e-78f9-9d78-f9c25acdb5a2" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BalanceSheetLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BalanceSheetLocationAxis_019e0856-7a4e-7bd9-b3a4-907c99cfa0e2" xlink:to="loc_us-gaap_BalanceSheetLocationDomain_019e0856-7a4e-78f9-9d78-f9c25acdb5a2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_PropertyPlantandEquipmentGrossMember_019e0856-7a4e-76c4-977a-e80a45395bf4" xlink:href="hsy-20260628.xsd#hsy_PropertyPlantandEquipmentGrossMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BalanceSheetLocationDomain_019e0856-7a4e-78f9-9d78-f9c25acdb5a2" xlink:to="loc_hsy_PropertyPlantandEquipmentGrossMember_019e0856-7a4e-76c4-977a-e80a45395bf4" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_AccumulatedDepreciationMember_019e0856-7a4e-71fa-a389-bf3fbf2bbcfe" xlink:href="hsy-20260628.xsd#hsy_AccumulatedDepreciationMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BalanceSheetLocationDomain_019e0856-7a4e-78f9-9d78-f9c25acdb5a2" xlink:to="loc_hsy_AccumulatedDepreciationMember_019e0856-7a4e-71fa-a389-bf3fbf2bbcfe" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PropertyPlantAndEquipmentMember_019e0856-7a4e-70f0-9aee-3325ae7717ab" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_PropertyPlantAndEquipmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BalanceSheetLocationDomain_019e0856-7a4e-78f9-9d78-f9c25acdb5a2" xlink:to="loc_us-gaap_PropertyPlantAndEquipmentMember_019e0856-7a4e-70f0-9aee-3325ae7717ab" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_019e0856-7a4e-793a-95c7-e0c95c3da166" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_019e0856-7a4e-7208-86a3-5daa030bdb7a" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_019e0856-7a4e-793a-95c7-e0c95c3da166" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAsset_019e0856-7a4e-7b77-8770-9f145912291f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FinanceLeaseRightOfUseAsset"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_019e0856-7a4e-7208-86a3-5daa030bdb7a" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAsset_019e0856-7a4e-7b77-8770-9f145912291f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAssetAccumulatedAmortization_019e0856-7a4e-74e3-a87f-bf6f37eca13f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FinanceLeaseRightOfUseAssetAccumulatedAmortization"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_019e0856-7a4e-7208-86a3-5daa030bdb7a" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAssetAccumulatedAmortization_019e0856-7a4e-74e3-a87f-bf6f37eca13f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LeaseRightofUseAsset_019e0856-7a4e-76a7-8079-c8a72362c802" xlink:href="hsy-20260628.xsd#hsy_LeaseRightofUseAsset"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_019e0856-7a4e-7208-86a3-5daa030bdb7a" xlink:to="loc_hsy_LeaseRightofUseAsset_019e0856-7a4e-76a7-8079-c8a72362c802" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_019e0856-7a4e-7c4b-a540-198f3660c58f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_019e0856-7a4e-7208-86a3-5daa030bdb7a" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_019e0856-7a4e-7c4b-a540-198f3660c58f" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityCurrent_019e0856-7a4e-7e2f-b01f-276ededdba15" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FinanceLeaseLiabilityCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_019e0856-7a4e-7208-86a3-5daa030bdb7a" xlink:to="loc_us-gaap_FinanceLeaseLiabilityCurrent_019e0856-7a4e-7e2f-b01f-276ededdba15" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_019e0856-7a4e-7413-9db7-8d7daf832058" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingLeaseLiabilityNoncurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_019e0856-7a4e-7208-86a3-5daa030bdb7a" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_019e0856-7a4e-7413-9db7-8d7daf832058" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityNoncurrent_019e0856-7a4e-7735-85c7-296f1e88224e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_FinanceLeaseLiabilityNoncurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_019e0856-7a4e-7208-86a3-5daa030bdb7a" xlink:to="loc_us-gaap_FinanceLeaseLiabilityNoncurrent_019e0856-7a4e-7735-85c7-296f1e88224e" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_LeaseLiability_019e0856-7a4e-7d48-9bfb-8c554f0eb1af" xlink:href="hsy-20260628.xsd#hsy_LeaseLiability"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_019e0856-7a4e-7208-86a3-5daa030bdb7a" xlink:to="loc_hsy_LeaseLiability_019e0856-7a4e-7d48-9bfb-8c554f0eb1af" xlink:type="arc" order="8"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/INVESTMENTSINUNCONSOLIDATEDAFFILIATESDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#INVESTMENTSINUNCONSOLIDATEDAFFILIATESDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/INVESTMENTSINUNCONSOLIDATEDAFFILIATESDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4e-7b76-bf09-1547300db055" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BusinessAcquisitionLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_019e0856-7a4e-7532-9378-b5ba9aae98fd" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4e-7b76-bf09-1547300db055" xlink:to="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_019e0856-7a4e-7532-9378-b5ba9aae98fd" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BalanceSheetLocationAxis_019e0856-7a4e-796f-8aff-23cf139aca70" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BalanceSheetLocationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfBusinessAcquisitionsByAcquisitionTable_019e0856-7a4e-7532-9378-b5ba9aae98fd" xlink:to="loc_us-gaap_BalanceSheetLocationAxis_019e0856-7a4e-796f-8aff-23cf139aca70" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BalanceSheetLocationDomain_019e0856-7a4e-796f-8aff-23cf139aca70_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BalanceSheetLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_BalanceSheetLocationAxis_019e0856-7a4e-796f-8aff-23cf139aca70" xlink:to="loc_us-gaap_BalanceSheetLocationDomain_019e0856-7a4e-796f-8aff-23cf139aca70_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BalanceSheetLocationDomain_019e0856-7a4e-73de-a46f-cab6ae7cd4ba" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_BalanceSheetLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_BalanceSheetLocationAxis_019e0856-7a4e-796f-8aff-23cf139aca70" xlink:to="loc_us-gaap_BalanceSheetLocationDomain_019e0856-7a4e-73de-a46f-cab6ae7cd4ba" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNoncurrentAssetsMember_019e0856-7a4e-7a54-b7e3-4f38d2c65fb4" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherNoncurrentAssetsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BalanceSheetLocationDomain_019e0856-7a4e-73de-a46f-cab6ae7cd4ba" xlink:to="loc_us-gaap_OtherNoncurrentAssetsMember_019e0856-7a4e-7a54-b7e3-4f38d2c65fb4" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVenturesFairValueDisclosure_019e0856-7a4e-71d3-926e-33efbf581419" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVenturesFairValueDisclosure"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_BusinessAcquisitionLineItems_019e0856-7a4e-7b76-bf09-1547300db055" xlink:to="loc_us-gaap_InvestmentsInAffiliatesSubsidiariesAssociatesAndJointVenturesFairValueDisclosure_019e0856-7a4e-71d3-926e-33efbf581419" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/BUSINESSREALIGNMENTACTIVITIESNARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#BUSINESSREALIGNMENTACTIVITIESNARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BUSINESSREALIGNMENTACTIVITIESNARRATIVEDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCostAndReserveLineItems_019e0856-7a4e-7dba-8054-a5a99e1f2a8b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringCostAndReserveLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_019e0856-7a4e-73fb-b653-e528dd90ddda" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfRestructuringAndRelatedCostsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_019e0856-7a4e-7dba-8054-a5a99e1f2a8b" xlink:to="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_019e0856-7a4e-73fb-b653-e528dd90ddda" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringPlanAxis_019e0856-7a4e-7413-b87d-c63b622726a7" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringPlanAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_019e0856-7a4e-73fb-b653-e528dd90ddda" xlink:to="loc_us-gaap_RestructuringPlanAxis_019e0856-7a4e-7413-b87d-c63b622726a7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringPlanDomain_019e0856-7a4e-7413-b87d-c63b622726a7_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringPlanDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringPlanAxis_019e0856-7a4e-7413-b87d-c63b622726a7" xlink:to="loc_us-gaap_RestructuringPlanDomain_019e0856-7a4e-7413-b87d-c63b622726a7_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringPlanDomain_019e0856-7a4e-79c6-ba1b-1993e68af98e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringPlanDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringPlanAxis_019e0856-7a4e-7413-b87d-c63b622726a7" xlink:to="loc_us-gaap_RestructuringPlanDomain_019e0856-7a4e-79c6-ba1b-1993e68af98e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_AdvancingAgilityAutomationInitiativeMember_019e0856-7a4e-79b4-9695-5780c7159c91" xlink:href="hsy-20260628.xsd#hsy_AdvancingAgilityAutomationInitiativeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_019e0856-7a4e-79c6-ba1b-1993e68af98e" xlink:to="loc_hsy_AdvancingAgilityAutomationInitiativeMember_019e0856-7a4e-79b4-9695-5780c7159c91" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_019e0856-7a4e-7c89-8d58-5d6e9c6d30c5" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_019e0856-7a4e-73fb-b653-e528dd90ddda" xlink:to="loc_srt_RangeAxis_019e0856-7a4e-7c89-8d58-5d6e9c6d30c5" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_019e0856-7a4e-7c89-8d58-5d6e9c6d30c5_default" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_019e0856-7a4e-7c89-8d58-5d6e9c6d30c5" xlink:to="loc_srt_RangeMember_019e0856-7a4e-7c89-8d58-5d6e9c6d30c5_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_019e0856-7a4e-7e79-bb69-508498748e21" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_019e0856-7a4e-7c89-8d58-5d6e9c6d30c5" xlink:to="loc_srt_RangeMember_019e0856-7a4e-7e79-bb69-508498748e21" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_019e0856-7a4e-7a32-8e28-e1f063883501" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_019e0856-7a4e-7e79-bb69-508498748e21" xlink:to="loc_srt_MinimumMember_019e0856-7a4e-7a32-8e28-e1f063883501" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_019e0856-7a4e-7528-809e-51aa6e0d32f4" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_019e0856-7a4e-7e79-bb69-508498748e21" xlink:to="loc_srt_MaximumMember_019e0856-7a4e-7528-809e-51aa6e0d32f4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCostAndReserveAxis_019e0856-7a4e-7132-b6dd-8482157a96ce" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringCostAndReserveAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_019e0856-7a4e-73fb-b653-e528dd90ddda" xlink:to="loc_us-gaap_RestructuringCostAndReserveAxis_019e0856-7a4e-7132-b6dd-8482157a96ce" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_019e0856-7a4e-7132-b6dd-8482157a96ce_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_TypeOfRestructuringDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_019e0856-7a4e-7132-b6dd-8482157a96ce" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_019e0856-7a4e-7132-b6dd-8482157a96ce_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_019e0856-7a4e-7ddf-88f5-89721c45a13f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_TypeOfRestructuringDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_019e0856-7a4e-7132-b6dd-8482157a96ce" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_019e0856-7a4e-7ddf-88f5-89721c45a13f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_ProgramOfficeExecutionAndThirdPartyCostsMember_019e0856-7a4e-7b2c-91af-1ef5138823e2" xlink:href="hsy-20260628.xsd#hsy_ProgramOfficeExecutionAndThirdPartyCostsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_019e0856-7a4e-7ddf-88f5-89721c45a13f" xlink:to="loc_hsy_ProgramOfficeExecutionAndThirdPartyCostsMember_019e0856-7a4e-7b2c-91af-1ef5138823e2" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_TechnologyCapabilityCostsMember_019e0856-7a4e-7003-87ee-7b7e6afb9735" xlink:href="hsy-20260628.xsd#hsy_TechnologyCapabilityCostsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_019e0856-7a4e-7ddf-88f5-89721c45a13f" xlink:to="loc_hsy_TechnologyCapabilityCostsMember_019e0856-7a4e-7003-87ee-7b7e6afb9735" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeSeveranceMember_019e0856-7a4e-7fb4-ad38-190441d68385" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EmployeeSeveranceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_019e0856-7a4e-7ddf-88f5-89721c45a13f" xlink:to="loc_us-gaap_EmployeeSeveranceMember_019e0856-7a4e-7fb4-ad38-190441d68385" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringAndRelatedCostExpectedCost1_019e0856-7a4e-7d3b-b86a-348026d073f8" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringAndRelatedCostExpectedCost1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_019e0856-7a4e-7dba-8054-a5a99e1f2a8b" xlink:to="loc_us-gaap_RestructuringAndRelatedCostExpectedCost1_019e0856-7a4e-7d3b-b86a-348026d073f8" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_RestructuringandRelatedCostExpectedCostCashPortion_019e0856-7a4e-7e5b-bc88-c397e2e10db6" xlink:href="hsy-20260628.xsd#hsy_RestructuringandRelatedCostExpectedCostCashPortion"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_019e0856-7a4e-7dba-8054-a5a99e1f2a8b" xlink:to="loc_hsy_RestructuringandRelatedCostExpectedCostCashPortion_019e0856-7a4e-7e5b-bc88-c397e2e10db6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_RestructuringAndRelatedCostExpectedSavings_019e0856-7a4e-7e12-b971-c1f146cda42a" xlink:href="hsy-20260628.xsd#hsy_RestructuringAndRelatedCostExpectedSavings"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_019e0856-7a4e-7dba-8054-a5a99e1f2a8b" xlink:to="loc_hsy_RestructuringAndRelatedCostExpectedSavings_019e0856-7a4e-7e12-b971-c1f146cda42a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringAndRelatedCostCostIncurredToDate1_019e0856-7a4e-70d8-a003-a7332a4e211e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringAndRelatedCostCostIncurredToDate1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_019e0856-7a4e-7dba-8054-a5a99e1f2a8b" xlink:to="loc_us-gaap_RestructuringAndRelatedCostCostIncurredToDate1_019e0856-7a4e-70d8-a003-a7332a4e211e" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCharges_019e0856-7a4e-7f4e-a0a4-5605d8285fe3" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringCharges"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_019e0856-7a4e-7dba-8054-a5a99e1f2a8b" xlink:to="loc_us-gaap_RestructuringCharges_019e0856-7a4e-7f4e-a0a4-5605d8285fe3" xlink:type="arc" order="4"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/BUSINESSREALIGNMENTACTIVITIESSCHEDULEOFBUSINESSREALIGNMENTACTIVITYDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#BUSINESSREALIGNMENTACTIVITIESSCHEDULEOFBUSINESSREALIGNMENTACTIVITYDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BUSINESSREALIGNMENTACTIVITIESSCHEDULEOFBUSINESSREALIGNMENTACTIVITYDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCostAndReserveLineItems_019e0856-7a4e-7cfe-9862-cc8d8469799c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringCostAndReserveLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_019e0856-7a4e-7a5f-98f2-cea021fc5181" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfRestructuringAndRelatedCostsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_019e0856-7a4e-7cfe-9862-cc8d8469799c" xlink:to="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_019e0856-7a4e-7a5f-98f2-cea021fc5181" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_019e0856-7a4e-7a81-b7d2-3d4fdfc803fd" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeStatementLocationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_019e0856-7a4e-7a5f-98f2-cea021fc5181" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_019e0856-7a4e-7a81-b7d2-3d4fdfc803fd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_019e0856-7a4e-7a81-b7d2-3d4fdfc803fd_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeStatementLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_019e0856-7a4e-7a81-b7d2-3d4fdfc803fd" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_019e0856-7a4e-7a81-b7d2-3d4fdfc803fd_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_019e0856-7a4e-7f23-b062-456ae791c8c1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeStatementLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_019e0856-7a4e-7a81-b7d2-3d4fdfc803fd" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_019e0856-7a4e-7f23-b062-456ae791c8c1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfSalesMember_019e0856-7a4e-783d-ae4a-7d5d356b7453" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CostOfSalesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_019e0856-7a4e-7f23-b062-456ae791c8c1" xlink:to="loc_us-gaap_CostOfSalesMember_019e0856-7a4e-783d-ae4a-7d5d356b7453" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpensesMember_019e0856-7a4e-7a6d-95e3-1ac1301d4cc1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SellingGeneralAndAdministrativeExpensesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_019e0856-7a4e-7f23-b062-456ae791c8c1" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpensesMember_019e0856-7a4e-7a6d-95e3-1ac1301d4cc1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringChargesMember_019e0856-7a4e-75d2-a922-cef639862745" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringChargesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_019e0856-7a4e-7f23-b062-456ae791c8c1" xlink:to="loc_us-gaap_RestructuringChargesMember_019e0856-7a4e-75d2-a922-cef639862745" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCostAndReserveAxis_019e0856-7a4e-7b80-8eb0-60bdc3a73f0f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringCostAndReserveAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_019e0856-7a4e-7a5f-98f2-cea021fc5181" xlink:to="loc_us-gaap_RestructuringCostAndReserveAxis_019e0856-7a4e-7b80-8eb0-60bdc3a73f0f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_019e0856-7a4e-7b80-8eb0-60bdc3a73f0f_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_TypeOfRestructuringDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_019e0856-7a4e-7b80-8eb0-60bdc3a73f0f" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_019e0856-7a4e-7b80-8eb0-60bdc3a73f0f_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_019e0856-7a4e-7c5f-ada1-3d0b89fbf9ee" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_TypeOfRestructuringDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_019e0856-7a4e-7b80-8eb0-60bdc3a73f0f" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_019e0856-7a4e-7c5f-ada1-3d0b89fbf9ee" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeSeveranceMember_019e0856-7a4e-7e7d-bc31-127b01561d4a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EmployeeSeveranceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_019e0856-7a4e-7c5f-ada1-3d0b89fbf9ee" xlink:to="loc_us-gaap_EmployeeSeveranceMember_019e0856-7a4e-7e7d-bc31-127b01561d4a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherRestructuringMember_019e0856-7a4e-7396-b346-3b889424d74f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherRestructuringMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_019e0856-7a4e-7c5f-ada1-3d0b89fbf9ee" xlink:to="loc_us-gaap_OtherRestructuringMember_019e0856-7a4e-7396-b346-3b889424d74f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringPlanAxis_019e0856-7a4e-7b3d-82a0-5631f304c2a3" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringPlanAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_019e0856-7a4e-7a5f-98f2-cea021fc5181" xlink:to="loc_us-gaap_RestructuringPlanAxis_019e0856-7a4e-7b3d-82a0-5631f304c2a3" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringPlanDomain_019e0856-7a4e-7b3d-82a0-5631f304c2a3_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringPlanDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringPlanAxis_019e0856-7a4e-7b3d-82a0-5631f304c2a3" xlink:to="loc_us-gaap_RestructuringPlanDomain_019e0856-7a4e-7b3d-82a0-5631f304c2a3_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringPlanDomain_019e0856-7a4e-78ea-a4a6-cf9bc2b59a83" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringPlanDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringPlanAxis_019e0856-7a4e-7b3d-82a0-5631f304c2a3" xlink:to="loc_us-gaap_RestructuringPlanDomain_019e0856-7a4e-78ea-a4a6-cf9bc2b59a83" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_AdvancingAgilityAutomationInitiativeMember_019e0856-7a4e-7713-a4f3-ed17eac6792b" xlink:href="hsy-20260628.xsd#hsy_AdvancingAgilityAutomationInitiativeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringPlanDomain_019e0856-7a4e-78ea-a4a6-cf9bc2b59a83" xlink:to="loc_hsy_AdvancingAgilityAutomationInitiativeMember_019e0856-7a4e-7713-a4f3-ed17eac6792b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCharges_019e0856-7a4e-71af-9564-bd82b34c3a20" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringCharges"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_019e0856-7a4e-7cfe-9862-cc8d8469799c" xlink:to="loc_us-gaap_RestructuringCharges_019e0856-7a4e-71af-9564-bd82b34c3a20" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/BUSINESSREALIGNMENTACTIVITIESSCHEDULEOFLIABILITYACTIVITIYFORCOSTSQUALIFYINGASEXITANDDISPOSALCOSTSDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#BUSINESSREALIGNMENTACTIVITIESSCHEDULEOFLIABILITYACTIVITIYFORCOSTSQUALIFYINGASEXITANDDISPOSALCOSTSDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/BUSINESSREALIGNMENTACTIVITIESSCHEDULEOFLIABILITYACTIVITIYFORCOSTSQUALIFYINGASEXITANDDISPOSALCOSTSDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCostAndReserveLineItems_019e0856-7a4e-748e-b268-9708047decb2" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringCostAndReserveLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_019e0856-7a4e-77c3-9eb2-d7769ed77f81" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfRestructuringAndRelatedCostsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_019e0856-7a4e-748e-b268-9708047decb2" xlink:to="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_019e0856-7a4e-77c3-9eb2-d7769ed77f81" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCostAndReserveAxis_019e0856-7a4e-7054-ae54-2fb9e25f4daa" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringCostAndReserveAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfRestructuringAndRelatedCostsTable_019e0856-7a4e-77c3-9eb2-d7769ed77f81" xlink:to="loc_us-gaap_RestructuringCostAndReserveAxis_019e0856-7a4e-7054-ae54-2fb9e25f4daa" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_019e0856-7a4e-7054-ae54-2fb9e25f4daa_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_TypeOfRestructuringDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_019e0856-7a4e-7054-ae54-2fb9e25f4daa" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_019e0856-7a4e-7054-ae54-2fb9e25f4daa_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TypeOfRestructuringDomain_019e0856-7a4e-7134-af77-cdffc81c41a3" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_TypeOfRestructuringDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RestructuringCostAndReserveAxis_019e0856-7a4e-7054-ae54-2fb9e25f4daa" xlink:to="loc_us-gaap_TypeOfRestructuringDomain_019e0856-7a4e-7134-af77-cdffc81c41a3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeSeveranceMember_019e0856-7a4e-7e40-a2c8-37d53120e32f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EmployeeSeveranceMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TypeOfRestructuringDomain_019e0856-7a4e-7134-af77-cdffc81c41a3" xlink:to="loc_us-gaap_EmployeeSeveranceMember_019e0856-7a4e-7e40-a2c8-37d53120e32f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringReserveRollForward_019e0856-7a4e-7239-aaf4-9648d8e2be12" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringReserveRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringCostAndReserveLineItems_019e0856-7a4e-748e-b268-9708047decb2" xlink:to="loc_us-gaap_RestructuringReserveRollForward_019e0856-7a4e-7239-aaf4-9648d8e2be12" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringReserve_019e0856-7a4e-7826-be4e-752514011991" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringReserve"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringReserveRollForward_019e0856-7a4e-7239-aaf4-9648d8e2be12" xlink:to="loc_us-gaap_RestructuringReserve_019e0856-7a4e-7826-be4e-752514011991" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCharges_019e0856-7a4e-7dad-9c4c-1a9303ca725c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringCharges"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringReserveRollForward_019e0856-7a4e-7239-aaf4-9648d8e2be12" xlink:to="loc_us-gaap_RestructuringCharges_019e0856-7a4e-7dad-9c4c-1a9303ca725c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PaymentsForRestructuring_019e0856-7a4e-726d-866c-e3f421e20059" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_PaymentsForRestructuring"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RestructuringReserveRollForward_019e0856-7a4e-7239-aaf4-9648d8e2be12" xlink:to="loc_us-gaap_PaymentsForRestructuring_019e0856-7a4e-726d-866c-e3f421e20059" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringReserve_019e0856-7a4e-7db1-ae5f-a81d74883459" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringReserve"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFCOMPONENTSOFNETPERIODICBENEFITCOSTDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFCOMPONENTSOFNETPERIODICBENEFITCOSTDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSSCHEDULEOFCOMPONENTSOFNETPERIODICBENEFITCOSTDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_019e0856-7a4e-75c8-a2b1-12cabc92a092" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_019e0856-7a4e-71b1-8e3c-a235376aa083" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_019e0856-7a4e-75c8-a2b1-12cabc92a092" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_019e0856-7a4e-71b1-8e3c-a235376aa083" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_019e0856-7a4e-7df3-ab48-5274f1163d05" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RetirementPlanTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_019e0856-7a4e-71b1-8e3c-a235376aa083" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_019e0856-7a4e-7df3-ab48-5274f1163d05" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_019e0856-7a4e-7df3-ab48-5274f1163d05_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_019e0856-7a4e-7df3-ab48-5274f1163d05" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_019e0856-7a4e-7df3-ab48-5274f1163d05_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_019e0856-7a4e-78e2-a708-dccf30bf2c48" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_019e0856-7a4e-7df3-ab48-5274f1163d05" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_019e0856-7a4e-78e2-a708-dccf30bf2c48" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PensionPlansDefinedBenefitMember_019e0856-7a4e-7eb9-a4b7-143b4250c98f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_PensionPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_019e0856-7a4e-78e2-a708-dccf30bf2c48" xlink:to="loc_us-gaap_PensionPlansDefinedBenefitMember_019e0856-7a4e-7eb9-a4b7-143b4250c98f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_019e0856-7a4e-7836-9a7a-d1b1493d27fb" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_019e0856-7a4e-78e2-a708-dccf30bf2c48" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_019e0856-7a4e-7836-9a7a-d1b1493d27fb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanServiceCost_019e0856-7a4e-76df-8c00-78c67ea71b58" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DefinedBenefitPlanServiceCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_019e0856-7a4e-75c8-a2b1-12cabc92a092" xlink:to="loc_us-gaap_DefinedBenefitPlanServiceCost_019e0856-7a4e-76df-8c00-78c67ea71b58" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanInterestCost_019e0856-7a4e-7d90-8fcf-b5f6ad4a9d3d" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DefinedBenefitPlanInterestCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_019e0856-7a4e-75c8-a2b1-12cabc92a092" xlink:to="loc_us-gaap_DefinedBenefitPlanInterestCost_019e0856-7a4e-7d90-8fcf-b5f6ad4a9d3d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets_019e0856-7a4e-7165-972a-f925de45281b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_019e0856-7a4e-75c8-a2b1-12cabc92a092" xlink:to="loc_us-gaap_DefinedBenefitPlanExpectedReturnOnPlanAssets_019e0856-7a4e-7165-972a-f925de45281b" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit_019e0856-7a4e-7a44-8945-0b93d723846c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_019e0856-7a4e-75c8-a2b1-12cabc92a092" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfPriorServiceCostCredit_019e0856-7a4e-7a44-8945-0b93d723846c" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses_019e0856-7a4e-7153-b869-1c958df51cff" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_019e0856-7a4e-75c8-a2b1-12cabc92a092" xlink:to="loc_us-gaap_DefinedBenefitPlanAmortizationOfGainsLosses_019e0856-7a4e-7153-b869-1c958df51cff" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1_019f80f7-7b51-72e3-afb4-d6319aa1ba9a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_019e0856-7a4e-75c8-a2b1-12cabc92a092" xlink:to="loc_us-gaap_DefinedBenefitPlanRecognizedNetGainLossDueToSettlements1_019f80f7-7b51-72e3-afb4-d6319aa1ba9a" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_019e0856-7a4e-70f4-bb75-eb04fa062f35" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_019e0856-7a4e-75c8-a2b1-12cabc92a092" xlink:to="loc_us-gaap_DefinedBenefitPlanNetPeriodicBenefitCost_019e0856-7a4e-70f4-bb75-eb04fa062f35" xlink:type="arc" order="6"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSNARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSNARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/PENSIONANDOTHERPOSTRETIREMENTBENEFITPLANSNARRATIVEDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_019e0856-7a4e-730a-be7e-21b31ca40737" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DefinedBenefitPlanDisclosureLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_019e0856-7a4e-724f-9377-4b89955ded03" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_019e0856-7a4e-730a-be7e-21b31ca40737" xlink:to="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_019e0856-7a4e-724f-9377-4b89955ded03" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeAxis_019e0856-7a4e-7fa0-8bf4-4ca0f1fe8f69" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RetirementPlanTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfDefinedBenefitPlansDisclosuresTable_019e0856-7a4e-724f-9377-4b89955ded03" xlink:to="loc_us-gaap_RetirementPlanTypeAxis_019e0856-7a4e-7fa0-8bf4-4ca0f1fe8f69" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_019e0856-7a4e-7fa0-8bf4-4ca0f1fe8f69_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_019e0856-7a4e-7fa0-8bf4-4ca0f1fe8f69" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_019e0856-7a4e-7fa0-8bf4-4ca0f1fe8f69_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetirementPlanTypeDomain_019e0856-7a4e-7924-81eb-516d3fe96831" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RetirementPlanTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_RetirementPlanTypeAxis_019e0856-7a4e-7fa0-8bf4-4ca0f1fe8f69" xlink:to="loc_us-gaap_RetirementPlanTypeDomain_019e0856-7a4e-7924-81eb-516d3fe96831" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_PensionPlansDefinedBenefitMember_019e0856-7a4e-7d29-88d0-77b94e76f088" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_PensionPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_019e0856-7a4e-7924-81eb-516d3fe96831" xlink:to="loc_us-gaap_PensionPlansDefinedBenefitMember_019e0856-7a4e-7d29-88d0-77b94e76f088" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_019e0856-7a4e-793f-b948-c8e09ce0567e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_RetirementPlanTypeDomain_019e0856-7a4e-7924-81eb-516d3fe96831" xlink:to="loc_us-gaap_OtherPostretirementBenefitPlansDefinedBenefitMember_019e0856-7a4e-793f-b948-c8e09ce0567e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanContributionsByEmployer_019e0856-7a4e-776f-b9a7-2d91243f46dd" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DefinedBenefitPlanContributionsByEmployer"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_019e0856-7a4e-730a-be7e-21b31ca40737" xlink:to="loc_us-gaap_DefinedBenefitPlanContributionsByEmployer_019e0856-7a4e-776f-b9a7-2d91243f46dd" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DefinedBenefitPlanRemeasurementBasisSpreadOnDiscountRate_019f80d9-e2ab-76c8-ab46-7a9a49ac9f17" xlink:href="hsy-20260628.xsd#hsy_DefinedBenefitPlanRemeasurementBasisSpreadOnDiscountRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_019e0856-7a4e-730a-be7e-21b31ca40737" xlink:to="loc_hsy_DefinedBenefitPlanRemeasurementBasisSpreadOnDiscountRate_019f80d9-e2ab-76c8-ab46-7a9a49ac9f17" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostExpectedLongTermReturnOnAssets_019f80d9-e2ab-7513-8169-88bd54dedbee" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostExpectedLongTermReturnOnAssets"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DefinedBenefitPlanDisclosureLineItems_019e0856-7a4e-730a-be7e-21b31ca40737" xlink:to="loc_us-gaap_DefinedBenefitPlanAssumptionsUsedCalculatingNetPeriodicBenefitCostExpectedLongTermReturnOnAssets_019f80d9-e2ab-7513-8169-88bd54dedbee" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/STOCKCOMPENSATIONPLANSNARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#STOCKCOMPENSATIONPLANSNARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/STOCKCOMPENSATIONPLANSNARRATIVEDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-7dd5-8f2f-5ca293d9150e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_019e0856-7b28-7c38-8439-1d3edf2feb2a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-7dd5-8f2f-5ca293d9150e" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_019e0856-7b28-7c38-8439-1d3edf2feb2a" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AwardTypeAxis_019e0856-7b28-7029-a699-219eaf01bc15" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AwardTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_019e0856-7b28-7c38-8439-1d3edf2feb2a" xlink:to="loc_us-gaap_AwardTypeAxis_019e0856-7b28-7029-a699-219eaf01bc15" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-7029-a699-219eaf01bc15_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_019e0856-7b28-7029-a699-219eaf01bc15" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-7029-a699-219eaf01bc15_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-7eb2-9e5a-a1b5334a6d12" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_019e0856-7b28-7029-a699-219eaf01bc15" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-7eb2-9e5a-a1b5334a6d12" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeStockOptionMember_019e0856-7b28-7d97-851c-7a5f16dc079c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EmployeeStockOptionMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-7eb2-9e5a-a1b5334a6d12" xlink:to="loc_us-gaap_EmployeeStockOptionMember_019e0856-7b28-7d97-851c-7a5f16dc079c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_PerformanceStockUnitsandRestrictedStockUnitsMember_019e0856-7b28-73fa-8218-9d67b37348e5" xlink:href="hsy-20260628.xsd#hsy_PerformanceStockUnitsandRestrictedStockUnitsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-7eb2-9e5a-a1b5334a6d12" xlink:to="loc_hsy_PerformanceStockUnitsandRestrictedStockUnitsMember_019e0856-7b28-73fa-8218-9d67b37348e5" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_019e0856-7b28-76c7-bfa2-585bbd7f00d1" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_019e0856-7b28-7c38-8439-1d3edf2feb2a" xlink:to="loc_srt_RangeAxis_019e0856-7b28-76c7-bfa2-585bbd7f00d1" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_019e0856-7b28-76c7-bfa2-585bbd7f00d1_default" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_019e0856-7b28-76c7-bfa2-585bbd7f00d1" xlink:to="loc_srt_RangeMember_019e0856-7b28-76c7-bfa2-585bbd7f00d1_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_019e0856-7b28-757a-85bc-f57f2cb62459" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_019e0856-7b28-76c7-bfa2-585bbd7f00d1" xlink:to="loc_srt_RangeMember_019e0856-7b28-757a-85bc-f57f2cb62459" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_019e0856-7b28-7608-bcdd-e3d6c11165be" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_019e0856-7b28-757a-85bc-f57f2cb62459" xlink:to="loc_srt_MinimumMember_019e0856-7b28-7608-bcdd-e3d6c11165be" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_019e0856-7b28-7256-b822-b0267d94e642" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_019e0856-7b28-757a-85bc-f57f2cb62459" xlink:to="loc_srt_MaximumMember_019e0856-7b28-7256-b822-b0267d94e642" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized_019e0856-7b28-7f90-836c-305901d17f48" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-7dd5-8f2f-5ca293d9150e" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized_019e0856-7b28-7f90-836c-305901d17f48" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1_019e0856-7b28-7d82-aa8e-f844e58dd918" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-7dd5-8f2f-5ca293d9150e" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1_019e0856-7b28-7d82-aa8e-f844e58dd918" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod_019e0856-7b28-735f-9529-6ca3ff8b5e6f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-7dd5-8f2f-5ca293d9150e" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod_019e0856-7b28-735f-9529-6ca3ff8b5e6f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_019e0856-7b28-7b3e-b05b-cc9f7d8824cc" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-7dd5-8f2f-5ca293d9150e" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_019e0856-7b28-7b3e-b05b-cc9f7d8824cc" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross_019e0856-7b28-7c9f-bf9b-eabd65766511" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-7dd5-8f2f-5ca293d9150e" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodGross_019e0856-7b28-7c9f-bf9b-eabd65766511" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue_019e0856-7b28-790c-ba6e-6c773de467d4" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-7dd5-8f2f-5ca293d9150e" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsExercisesInPeriodTotalIntrinsicValue_019e0856-7b28-790c-ba6e-6c773de467d4" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardRequisiteServicePeriod1_019e0856-7b28-7d72-8dd3-9551af042398" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardRequisiteServicePeriod1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-7dd5-8f2f-5ca293d9150e" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardRequisiteServicePeriod1_019e0856-7b28-7d72-8dd3-9551af042398" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardPerformanceScoreTargetAmounts_019e0856-7b28-71a7-866f-d0fd7cdc8c1a" xlink:href="hsy-20260628.xsd#hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardPerformanceScoreTargetAmounts"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-7dd5-8f2f-5ca293d9150e" xlink:to="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardPerformanceScoreTargetAmounts_019e0856-7b28-71a7-866f-d0fd7cdc8c1a" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardIntrinsicValueOfShareBasedLiabilitiesPaidCombinedWithFairValueOfSharesVested_019e0856-7b28-7df6-bf0f-09107f37e0f3" xlink:href="hsy-20260628.xsd#hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardIntrinsicValueOfShareBasedLiabilitiesPaidCombinedWithFairValueOfSharesVested"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-7dd5-8f2f-5ca293d9150e" xlink:to="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardIntrinsicValueOfShareBasedLiabilitiesPaidCombinedWithFairValueOfSharesVested_019e0856-7b28-7df6-bf0f-09107f37e0f3" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DeferredCompensationArrangementWithIndividualSharesIssued_019e0856-7b28-72b4-b4a3-15cf24367e90" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DeferredCompensationArrangementWithIndividualSharesIssued"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-7dd5-8f2f-5ca293d9150e" xlink:to="loc_us-gaap_DeferredCompensationArrangementWithIndividualSharesIssued_019e0856-7b28-72b4-b4a3-15cf24367e90" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DeferredCompensationArrangementwithIndividualConversionBasis_019e0856-7b28-7069-a0e3-1b92c9e0cbf0" xlink:href="hsy-20260628.xsd#hsy_DeferredCompensationArrangementwithIndividualConversionBasis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-7dd5-8f2f-5ca293d9150e" xlink:to="loc_hsy_DeferredCompensationArrangementwithIndividualConversionBasis_019e0856-7b28-7069-a0e3-1b92c9e0cbf0" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_019f8109-3fdd-7a15-82c6-6b1376e0037a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-7dd5-8f2f-5ca293d9150e" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_019f8109-3fdd-7a15-82c6-6b1376e0037a" xlink:type="arc" order="11"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/STOCKCOMPENSATIONPLANSSCHEDULEOFPSUsANDRSUsACTIVITYDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#STOCKCOMPENSATIONPLANSSCHEDULEOFPSUsANDRSUsACTIVITYDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/STOCKCOMPENSATIONPLANSSCHEDULEOFPSUsANDRSUsACTIVITYDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-7bb9-b34a-f3e3c0e3c20e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_019e0856-7b28-7e76-b1ea-bf70451e0ff7" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-7bb9-b34a-f3e3c0e3c20e" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_019e0856-7b28-7e76-b1ea-bf70451e0ff7" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AwardTypeAxis_019e0856-7b28-73ad-a7af-d902ed6e37f7" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AwardTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_019e0856-7b28-7e76-b1ea-bf70451e0ff7" xlink:to="loc_us-gaap_AwardTypeAxis_019e0856-7b28-73ad-a7af-d902ed6e37f7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-73ad-a7af-d902ed6e37f7_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_019e0856-7b28-73ad-a7af-d902ed6e37f7" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-73ad-a7af-d902ed6e37f7_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-71c1-aaa0-67e715709b90" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_019e0856-7b28-73ad-a7af-d902ed6e37f7" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-71c1-aaa0-67e715709b90" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_019e0856-7b28-728d-8788-7164e1d61524" xlink:href="hsy-20260628.xsd#hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-71c1-aaa0-67e715709b90" xlink:to="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_019e0856-7b28-728d-8788-7164e1d61524" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_019e0856-7b28-7021-99eb-a81988342b50" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-7bb9-b34a-f3e3c0e3c20e" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_019e0856-7b28-7021-99eb-a81988342b50" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_019e0856-7b28-7832-9e13-bab858ff5db4" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_019e0856-7b28-7021-99eb-a81988342b50" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_019e0856-7b28-7832-9e13-bab858ff5db4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_019e0856-7b28-71c9-8db4-bf146e324ffd" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_019e0856-7b28-7021-99eb-a81988342b50" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_019e0856-7b28-71c9-8db4-bf146e324ffd" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChange_019e0856-7b28-7188-8e81-774b9619cfa2" xlink:href="hsy-20260628.xsd#hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChange"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_019e0856-7b28-7021-99eb-a81988342b50" xlink:to="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChange_019e0856-7b28-7188-8e81-774b9619cfa2" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod_019e0856-7b28-7803-aca7-784c92d05e63" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_019e0856-7b28-7021-99eb-a81988342b50" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriod_019e0856-7b28-7803-aca7-784c92d05e63" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod_019e0856-7b28-7ce4-8497-8f674c4e2ab3" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardNonOptionEquityInstrumentsOutstandingRollForward_019e0856-7b28-7021-99eb-a81988342b50" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeitedInPeriod_019e0856-7b28-7ce4-8497-8f674c4e2ab3" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber_019e0856-7b28-7b4d-b791-c0e95889d25d" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedNumber"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_019e0856-7b28-7a36-9a22-bd503afaf551" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-7bb9-b34a-f3e3c0e3c20e" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_019e0856-7b28-7a36-9a22-bd503afaf551" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_019e0856-7b28-7b2b-b4db-95dee19729a8" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_019e0856-7b28-7a36-9a22-bd503afaf551" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_019e0856-7b28-7b2b-b4db-95dee19729a8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_019e0856-7b28-7863-9b46-134adca564ba" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_019e0856-7b28-7a36-9a22-bd503afaf551" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_019e0856-7b28-7863-9b46-134adca564ba" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChangeWeightedAverageGrantDateFairValue_019e0856-7b28-7c1f-bc8f-bb30c44f40c9" xlink:href="hsy-20260628.xsd#hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChangeWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_019e0856-7b28-7a36-9a22-bd503afaf551" xlink:to="loc_hsy_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsPerformanceAssumptionChangeWeightedAverageGrantDateFairValue_019e0856-7b28-7c1f-bc8f-bb30c44f40c9" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue_019e0856-7b28-77d7-9174-deba317dc134" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_019e0856-7b28-7a36-9a22-bd503afaf551" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsVestedInPeriodWeightedAverageGrantDateFairValue_019e0856-7b28-77d7-9174-deba317dc134" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue_019e0856-7b28-7149-a7f9-6fe0ddf1fcdb" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValueRollForward_019e0856-7b28-7a36-9a22-bd503afaf551" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsForfeituresWeightedAverageGrantDateFairValue_019e0856-7b28-7149-a7f9-6fe0ddf1fcdb" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue_019e0856-7b28-71ef-a5ae-878d22f47bbd" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedWeightedAverageGrantDateFairValue"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/STOCKCOMPENSATIONPLANSSCHEDULEOFPSUsANDRSUSFAIRVALUEWEIGHTEDAVERAGEASSUMPTIONSDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#STOCKCOMPENSATIONPLANSSCHEDULEOFPSUsANDRSUSFAIRVALUEWEIGHTEDAVERAGEASSUMPTIONSDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/STOCKCOMPENSATIONPLANSSCHEDULEOFPSUsANDRSUSFAIRVALUEWEIGHTEDAVERAGEASSUMPTIONSDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-75cd-a829-c7e64718ecc2" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_019e0856-7b28-7a15-b041-62645e6c6ac8" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-75cd-a829-c7e64718ecc2" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_019e0856-7b28-7a15-b041-62645e6c6ac8" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AwardTypeAxis_019e0856-7b28-7e89-b7f1-1d2ae7ffbc89" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AwardTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_019e0856-7b28-7a15-b041-62645e6c6ac8" xlink:to="loc_us-gaap_AwardTypeAxis_019e0856-7b28-7e89-b7f1-1d2ae7ffbc89" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-7e89-b7f1-1d2ae7ffbc89_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_019e0856-7b28-7e89-b7f1-1d2ae7ffbc89" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-7e89-b7f1-1d2ae7ffbc89_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-7080-8bca-c55789ad6f91" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_019e0856-7b28-7e89-b7f1-1d2ae7ffbc89" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-7080-8bca-c55789ad6f91" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_019e0856-7b28-7cec-9522-a471db916228" xlink:href="hsy-20260628.xsd#hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-7080-8bca-c55789ad6f91" xlink:to="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_019e0856-7b28-7cec-9522-a471db916228" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_019e0856-7b28-7cdd-9b94-7b137567411f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-75cd-a829-c7e64718ecc2" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_019e0856-7b28-7cdd-9b94-7b137567411f" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_019e0856-7b28-7da5-a6d3-18220f4f1818" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-75cd-a829-c7e64718ecc2" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_019e0856-7b28-7da5-a6d3-18220f4f1818" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SharePrice_019e0856-7b28-75cb-83ed-658db4b1213f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SharePrice"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-75cd-a829-c7e64718ecc2" xlink:to="loc_us-gaap_SharePrice_019e0856-7b28-75cb-83ed-658db4b1213f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate_019e0856-7b28-7d69-bf6e-4a6d41bb7c08" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-75cd-a829-c7e64718ecc2" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedDividendRate_019e0856-7b28-7d69-bf6e-4a6d41bb7c08" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate_019e0856-7b28-7da7-bc93-5730a6610c3f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_019e0856-7b28-75cd-a829-c7e64718ecc2" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardFairValueAssumptionsExpectedVolatilityRate_019e0856-7b28-7da7-bc93-5730a6610c3f" xlink:type="arc" order="4"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SEGMENTINFORMATIONNARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#SEGMENTINFORMATIONNARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SEGMENTINFORMATIONNARRATIVEDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_019e0856-7b28-7ed1-8568-4b339b3e7de4" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EntityWideRevenueMajorCustomerLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_019e0856-7b28-72c1-8f00-387705c654a2" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_019e0856-7b28-7ed1-8568-4b339b3e7de4" xlink:to="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_019e0856-7b28-72c1-8f00-387705c654a2" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_019e0856-7b28-779c-b134-f32b9257c35b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeStatementLocationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_019e0856-7b28-72c1-8f00-387705c654a2" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_019e0856-7b28-779c-b134-f32b9257c35b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_019e0856-7b28-779c-b134-f32b9257c35b_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeStatementLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_019e0856-7b28-779c-b134-f32b9257c35b" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_019e0856-7b28-779c-b134-f32b9257c35b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_019e0856-7b28-7cc0-b23f-569b0a232292" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeStatementLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_019e0856-7b28-779c-b134-f32b9257c35b" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_019e0856-7b28-7cc0-b23f-569b0a232292" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfSalesMember_019e0856-7b28-7672-a1cc-3ee0dd9e687e" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CostOfSalesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_019e0856-7b28-7cc0-b23f-569b0a232292" xlink:to="loc_us-gaap_CostOfSalesMember_019e0856-7b28-7672-a1cc-3ee0dd9e687e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_StatementScenarioAxis_019e0856-7b28-7612-825f-f335e636e377" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_StatementScenarioAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_019e0856-7b28-72c1-8f00-387705c654a2" xlink:to="loc_srt_StatementScenarioAxis_019e0856-7b28-7612-825f-f335e636e377" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ScenarioUnspecifiedDomain_019e0856-7b28-7612-825f-f335e636e377_default" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ScenarioUnspecifiedDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementScenarioAxis_019e0856-7b28-7612-825f-f335e636e377" xlink:to="loc_srt_ScenarioUnspecifiedDomain_019e0856-7b28-7612-825f-f335e636e377_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ScenarioUnspecifiedDomain_019e0856-7b28-7538-99aa-6bd29fe27a0f" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ScenarioUnspecifiedDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementScenarioAxis_019e0856-7b28-7612-825f-f335e636e377" xlink:to="loc_srt_ScenarioUnspecifiedDomain_019e0856-7b28-7538-99aa-6bd29fe27a0f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ScenarioForecastMember_019e0856-7b28-715b-915e-354803eb7d24" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ScenarioForecastMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ScenarioUnspecifiedDomain_019e0856-7b28-7538-99aa-6bd29fe27a0f" xlink:to="loc_srt_ScenarioForecastMember_019e0856-7b28-715b-915e-354803eb7d24" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsAxis_019e0856-7b28-7022-a269-3ddbf2cb7a35" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ConsolidationItemsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_019e0856-7b28-72c1-8f00-387705c654a2" xlink:to="loc_srt_ConsolidationItemsAxis_019e0856-7b28-7022-a269-3ddbf2cb7a35" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_019e0856-7b28-7022-a269-3ddbf2cb7a35_default" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_019e0856-7b28-7022-a269-3ddbf2cb7a35" xlink:to="loc_srt_ConsolidationItemsDomain_019e0856-7b28-7022-a269-3ddbf2cb7a35_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_019e0856-7b28-7154-9fe2-cfaa1c970666" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_019e0856-7b28-7022-a269-3ddbf2cb7a35" xlink:to="loc_srt_ConsolidationItemsDomain_019e0856-7b28-7154-9fe2-cfaa1c970666" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingSegmentsMember_019e0856-7b28-7468-8e00-de343aa964c6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingSegmentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_019e0856-7b28-7154-9fe2-cfaa1c970666" xlink:to="loc_us-gaap_OperatingSegmentsMember_019e0856-7b28-7468-8e00-de343aa964c6" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7b28-7cec-aae8-16c6d4f98176" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_019e0856-7b28-72c1-8f00-387705c654a2" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7b28-7cec-aae8-16c6d4f98176" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7b28-7cec-aae8-16c6d4f98176_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7b28-7cec-aae8-16c6d4f98176" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7b28-7cec-aae8-16c6d4f98176_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7b28-7079-b683-c43f7b25f3f4" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7b28-7cec-aae8-16c6d4f98176" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7b28-7079-b683-c43f7b25f3f4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommodityContractMember_019e0856-7b28-7964-8790-39759a115970" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommodityContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7b28-7079-b683-c43f7b25f3f4" xlink:to="loc_us-gaap_CommodityContractMember_019e0856-7b28-7964-8790-39759a115970" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NumberOfReportableSegments_019e0856-7b28-7b2d-87fb-38433167613c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_NumberOfReportableSegments"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_019e0856-7b28-7ed1-8568-4b339b3e7de4" xlink:to="loc_us-gaap_NumberOfReportableSegments_019e0856-7b28-7b2d-87fb-38433167613c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_CumulativeAmountOfMarkToMarketGainsLossesOnCommodityDerivatives_019e0856-7b28-76b9-b90e-70f0adaa67a0" xlink:href="hsy-20260628.xsd#hsy_CumulativeAmountOfMarkToMarketGainsLossesOnCommodityDerivatives"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_019e0856-7b28-7ed1-8568-4b339b3e7de4" xlink:to="loc_hsy_CumulativeAmountOfMarkToMarketGainsLossesOnCommodityDerivatives_019e0856-7b28-76b9-b90e-70f0adaa67a0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome_019e0856-7b28-7a7b-ac99-8f129e18ca0a" xlink:href="hsy-20260628.xsd#hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_019e0856-7b28-7ed1-8568-4b339b3e7de4" xlink:to="loc_hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome_019e0856-7b28-7a7b-ac99-8f129e18ca0a" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SEGMENTINFORMATIONSCHEDULEOFNETSALESANDEARNINGSBYSEGMENTDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#SEGMENTINFORMATIONSCHEDULEOFNETSALESANDEARNINGSBYSEGMENTDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SEGMENTINFORMATIONSCHEDULEOFNETSALESANDEARNINGSBYSEGMENTDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_019e0856-7b28-74b0-9cb4-3c001d9f2460" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SegmentReportingInformationLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_019e0856-7b28-7319-a520-830ff1800ba8" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_019e0856-7b28-74b0-9cb4-3c001d9f2460" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_019e0856-7b28-7319-a520-830ff1800ba8" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsAxis_019e0856-7b28-7918-b1a4-15ab097e6848" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ConsolidationItemsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_019e0856-7b28-7319-a520-830ff1800ba8" xlink:to="loc_srt_ConsolidationItemsAxis_019e0856-7b28-7918-b1a4-15ab097e6848" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_019e0856-7b28-7918-b1a4-15ab097e6848_default" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_019e0856-7b28-7918-b1a4-15ab097e6848" xlink:to="loc_srt_ConsolidationItemsDomain_019e0856-7b28-7918-b1a4-15ab097e6848_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_019e0856-7b28-7a58-8a1f-31773b9674a6" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_019e0856-7b28-7918-b1a4-15ab097e6848" xlink:to="loc_srt_ConsolidationItemsDomain_019e0856-7b28-7a58-8a1f-31773b9674a6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingSegmentsMember_019e0856-7b28-745c-9fb7-1c18eb5ba1cc" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingSegmentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_019e0856-7b28-7a58-8a1f-31773b9674a6" xlink:to="loc_us-gaap_OperatingSegmentsMember_019e0856-7b28-745c-9fb7-1c18eb5ba1cc" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CorporateNonSegmentMember_019e0856-7b28-73ef-a324-6608fb7be72b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CorporateNonSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_019e0856-7b28-7a58-8a1f-31773b9674a6" xlink:to="loc_us-gaap_CorporateNonSegmentMember_019e0856-7b28-73ef-a324-6608fb7be72b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_MaterialReconcilingItemsMember_019e0856-7b28-78c9-be79-246dd53865b9" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_MaterialReconcilingItemsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_019e0856-7b28-7a58-8a1f-31773b9674a6" xlink:to="loc_us-gaap_MaterialReconcilingItemsMember_019e0856-7b28-78c9-be79-246dd53865b9" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_019e0856-7b28-7f9f-8e96-905991a706c1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_019e0856-7b28-7319-a520-830ff1800ba8" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_019e0856-7b28-7f9f-8e96-905991a706c1" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_019e0856-7b28-7f9f-8e96-905991a706c1_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_019e0856-7b28-7f9f-8e96-905991a706c1" xlink:to="loc_us-gaap_SegmentDomain_019e0856-7b28-7f9f-8e96-905991a706c1_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_019e0856-7b28-712f-8bb5-8a34cd5fb1c9" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_019e0856-7b28-7f9f-8e96-905991a706c1" xlink:to="loc_us-gaap_SegmentDomain_019e0856-7b28-712f-8bb5-8a34cd5fb1c9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_NorthAmericaConfectionerySegmentMember_019e0856-7b28-7974-ae2c-8bab7063449c" xlink:href="hsy-20260628.xsd#hsy_NorthAmericaConfectionerySegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_019e0856-7b28-712f-8bb5-8a34cd5fb1c9" xlink:to="loc_hsy_NorthAmericaConfectionerySegmentMember_019e0856-7b28-7974-ae2c-8bab7063449c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_NorthAmericaSaltySnacksSegmentMember_019e0856-7b28-7239-9325-d3fd995514d7" xlink:href="hsy-20260628.xsd#hsy_NorthAmericaSaltySnacksSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_019e0856-7b28-712f-8bb5-8a34cd5fb1c9" xlink:to="loc_hsy_NorthAmericaSaltySnacksSegmentMember_019e0856-7b28-7239-9325-d3fd995514d7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_InternationalSegmentMember_019e0856-7b28-75b2-9027-bf3505623924" xlink:href="hsy-20260628.xsd#hsy_InternationalSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_019e0856-7b28-712f-8bb5-8a34cd5fb1c9" xlink:to="loc_hsy_InternationalSegmentMember_019e0856-7b28-75b2-9027-bf3505623924" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_019e0856-7b28-7676-bff2-675fbc31813c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_019e0856-7b28-74b0-9cb4-3c001d9f2460" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_019e0856-7b28-7676-bff2-675fbc31813c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfGoodsAndServicesSold_019e0856-7b28-7ca9-888b-dd298e9e45da" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CostOfGoodsAndServicesSold"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_019e0856-7b28-74b0-9cb4-3c001d9f2460" xlink:to="loc_us-gaap_CostOfGoodsAndServicesSold_019e0856-7b28-7ca9-888b-dd298e9e45da" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpense_019e0856-7b28-7a64-885c-2647eff84d43" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SellingGeneralAndAdministrativeExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_019e0856-7b28-74b0-9cb4-3c001d9f2460" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpense_019e0856-7b28-7a64-885c-2647eff84d43" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_019e0856-7b28-7519-9636-ef6af55e84f6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_019e0856-7b28-74b0-9cb4-3c001d9f2460" xlink:to="loc_us-gaap_OperatingIncomeLoss_019e0856-7b28-7519-9636-ef6af55e84f6" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NonoperatingIncomeExpense_019e0856-7b28-7f56-a5fe-d0210e7f4fa7" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_NonoperatingIncomeExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_019e0856-7b28-74b0-9cb4-3c001d9f2460" xlink:to="loc_us-gaap_NonoperatingIncomeExpense_019e0856-7b28-7f56-a5fe-d0210e7f4fa7" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeGainLossOnDerivativeNet_019e0856-7b28-7026-a1f0-2b0d014e94f9" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeGainLossOnDerivativeNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_019e0856-7b28-74b0-9cb4-3c001d9f2460" xlink:to="loc_us-gaap_DerivativeGainLossOnDerivativeNet_019e0856-7b28-7026-a1f0-2b0d014e94f9" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_DerivativeGainLossStatementOfIncomeOrComprehensiveIncomeExtensibleEnumerationNotDisclosedFlag_019e0856-7b28-7d08-88a2-4c7847239814" xlink:href="hsy-20260628.xsd#hsy_DerivativeGainLossStatementOfIncomeOrComprehensiveIncomeExtensibleEnumerationNotDisclosedFlag"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeGainLossOnDerivativeNet_019e0856-7b28-7026-a1f0-2b0d014e94f9" xlink:to="loc_hsy_DerivativeGainLossStatementOfIncomeOrComprehensiveIncomeExtensibleEnumerationNotDisclosedFlag_019e0856-7b28-7d08-88a2-4c7847239814" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RestructuringCharges_019e0856-7b28-739a-96db-5d10760709f5" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RestructuringCharges"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_019e0856-7b28-74b0-9cb4-3c001d9f2460" xlink:to="loc_us-gaap_RestructuringCharges_019e0856-7b28-739a-96db-5d10760709f5" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_019e0856-7b28-7f5c-b3cd-20999da0a9aa" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_InterestIncomeExpenseNonoperatingNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_019e0856-7b28-74b0-9cb4-3c001d9f2460" xlink:to="loc_us-gaap_InterestIncomeExpenseNonoperatingNet_019e0856-7b28-7f5c-b3cd-20999da0a9aa" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherNonoperatingIncomeExpense_019e0856-7b28-7e89-86ce-3f59b0bedb63" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OtherNonoperatingIncomeExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_019e0856-7b28-74b0-9cb4-3c001d9f2460" xlink:to="loc_us-gaap_OtherNonoperatingIncomeExpense_019e0856-7b28-7e89-86ce-3f59b0bedb63" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019e0856-7b28-7f5d-b41f-9842354e508b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_019e0856-7b28-74b0-9cb4-3c001d9f2460" xlink:to="loc_us-gaap_IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest_019e0856-7b28-7f5d-b41f-9842354e508b" xlink:type="arc" order="9"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SEGMENTINFORMATIONSCHEDULEOFUNALLOCATEDMARKTOMARKETGAINSLOSSESONCOMMODITYDERIVATIVESDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#SEGMENTINFORMATIONSCHEDULEOFUNALLOCATEDMARKTOMARKETGAINSLOSSESONCOMMODITYDERIVATIVESDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SEGMENTINFORMATIONSCHEDULEOFUNALLOCATEDMARKTOMARKETGAINSLOSSESONCOMMODITYDERIVATIVESDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_019e0856-7b28-7e07-9c83-d72b2e2c7895" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SegmentReportingInformationLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_019e0856-7b28-7940-a821-47666e144366" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_019e0856-7b28-7e07-9c83-d72b2e2c7895" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_019e0856-7b28-7940-a821-47666e144366" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationAxis_019e0856-7b28-7a85-9db6-054622bf9df0" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_HedgingDesignationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_019e0856-7b28-7940-a821-47666e144366" xlink:to="loc_us-gaap_HedgingDesignationAxis_019e0856-7b28-7a85-9db6-054622bf9df0" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationDomain_019e0856-7b28-7a85-9db6-054622bf9df0_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_HedgingDesignationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_HedgingDesignationAxis_019e0856-7b28-7a85-9db6-054622bf9df0" xlink:to="loc_us-gaap_HedgingDesignationDomain_019e0856-7b28-7a85-9db6-054622bf9df0_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationDomain_019e0856-7b28-7104-b97e-7eaa069dedbf" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_HedgingDesignationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_HedgingDesignationAxis_019e0856-7b28-7a85-9db6-054622bf9df0" xlink:to="loc_us-gaap_HedgingDesignationDomain_019e0856-7b28-7104-b97e-7eaa069dedbf" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NondesignatedMember_019e0856-7b28-7baa-bd19-c86ccb843b93" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_NondesignatedMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_019e0856-7b28-7104-b97e-7eaa069dedbf" xlink:to="loc_us-gaap_NondesignatedMember_019e0856-7b28-7baa-bd19-c86ccb843b93" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7b28-7842-b15e-0a65a9b2f6e1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_019e0856-7b28-7940-a821-47666e144366" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7b28-7842-b15e-0a65a9b2f6e1" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7b28-7842-b15e-0a65a9b2f6e1_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7b28-7842-b15e-0a65a9b2f6e1" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7b28-7842-b15e-0a65a9b2f6e1_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7b28-7cdd-afa0-40e36d9986a6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_019e0856-7b28-7842-b15e-0a65a9b2f6e1" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7b28-7cdd-afa0-40e36d9986a6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommodityContractMember_019e0856-7b28-7ba8-95db-e9788820465d" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommodityContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_019e0856-7b28-7cdd-afa0-40e36d9986a6" xlink:to="loc_us-gaap_CommodityContractMember_019e0856-7b28-7ba8-95db-e9788820465d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsAxis_019e0856-7b28-7e19-8dba-c10b0a977b1c" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ConsolidationItemsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_019e0856-7b28-7940-a821-47666e144366" xlink:to="loc_srt_ConsolidationItemsAxis_019e0856-7b28-7e19-8dba-c10b0a977b1c" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_019e0856-7b28-7e19-8dba-c10b0a977b1c_default" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_019e0856-7b28-7e19-8dba-c10b0a977b1c" xlink:to="loc_srt_ConsolidationItemsDomain_019e0856-7b28-7e19-8dba-c10b0a977b1c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_019e0856-7b28-784f-9dbb-dc0e86573499" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_019e0856-7b28-7e19-8dba-c10b0a977b1c" xlink:to="loc_srt_ConsolidationItemsDomain_019e0856-7b28-784f-9dbb-dc0e86573499" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingSegmentsMember_019e0856-7b28-7529-b3b7-a8f77697aa7a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingSegmentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_019e0856-7b28-784f-9dbb-dc0e86573499" xlink:to="loc_us-gaap_OperatingSegmentsMember_019e0856-7b28-7529-b3b7-a8f77697aa7a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeGainLossOnDerivativeNet_019e0856-7b28-77de-a0f5-a29b10f6a0a4" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DerivativeGainLossOnDerivativeNet"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_019e0856-7b28-7e07-9c83-d72b2e2c7895" xlink:to="loc_us-gaap_DerivativeGainLossOnDerivativeNet_019e0856-7b28-77de-a0f5-a29b10f6a0a4" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome_019e0856-7b28-7610-bb9e-0c95c53482a1" xlink:href="hsy-20260628.xsd#hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_019e0856-7b28-7e07-9c83-d72b2e2c7895" xlink:to="loc_hsy_NetGainLossOnCommodityDerivativePositionsReclassifiedFromUnallocatedDerivativeGainsLossesToSegmentIncome_019e0856-7b28-7610-bb9e-0c95c53482a1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_NetMarktoMarketValuationofCertainDerivativePositionsRecognizedinUnallocatedDerivativeGainsLosses_019e0856-7b28-75f1-81e2-d9f7c2d5628b" xlink:href="hsy-20260628.xsd#hsy_NetMarktoMarketValuationofCertainDerivativePositionsRecognizedinUnallocatedDerivativeGainsLosses"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_019e0856-7b28-7e07-9c83-d72b2e2c7895" xlink:to="loc_hsy_NetMarktoMarketValuationofCertainDerivativePositionsRecognizedinUnallocatedDerivativeGainsLosses_019e0856-7b28-75f1-81e2-d9f7c2d5628b" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SEGMENTINFORMATIONSCHEDULEOFDEPRECIATIONANDAMORTIZATIONEXPENSEINCLUDEDWITHINSEGMENTINCOMEDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#SEGMENTINFORMATIONSCHEDULEOFDEPRECIATIONANDAMORTIZATIONEXPENSEINCLUDEDWITHINSEGMENTINCOMEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SEGMENTINFORMATIONSCHEDULEOFDEPRECIATIONANDAMORTIZATIONEXPENSEINCLUDEDWITHINSEGMENTINCOMEDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentReportingInformationLineItems_019e0856-7b28-7e26-bc9c-3b670c073281" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SegmentReportingInformationLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_019e0856-7b28-7be2-9ae7-c81eda4e82ef" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_019e0856-7b28-7e26-bc9c-3b670c073281" xlink:to="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_019e0856-7b28-7be2-9ae7-c81eda4e82ef" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsAxis_019e0856-7b28-755c-8835-7cd1a0c375c4" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ConsolidationItemsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_019e0856-7b28-7be2-9ae7-c81eda4e82ef" xlink:to="loc_srt_ConsolidationItemsAxis_019e0856-7b28-755c-8835-7cd1a0c375c4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_019e0856-7b28-755c-8835-7cd1a0c375c4_default" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ConsolidationItemsAxis_019e0856-7b28-755c-8835-7cd1a0c375c4" xlink:to="loc_srt_ConsolidationItemsDomain_019e0856-7b28-755c-8835-7cd1a0c375c4_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ConsolidationItemsDomain_019e0856-7b28-7d39-afef-9536a9ba7da4" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ConsolidationItemsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ConsolidationItemsAxis_019e0856-7b28-755c-8835-7cd1a0c375c4" xlink:to="loc_srt_ConsolidationItemsDomain_019e0856-7b28-7d39-afef-9536a9ba7da4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingSegmentsMember_019e0856-7b28-72ba-a21d-3c39f10686ed" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_OperatingSegmentsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_019e0856-7b28-7d39-afef-9536a9ba7da4" xlink:to="loc_us-gaap_OperatingSegmentsMember_019e0856-7b28-72ba-a21d-3c39f10686ed" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CorporateNonSegmentMember_019e0856-7b28-7e63-8741-94aeaff16643" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CorporateNonSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ConsolidationItemsDomain_019e0856-7b28-7d39-afef-9536a9ba7da4" xlink:to="loc_us-gaap_CorporateNonSegmentMember_019e0856-7b28-7e63-8741-94aeaff16643" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementBusinessSegmentsAxis_019e0856-7b28-713f-8774-19b9e54f3867" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementBusinessSegmentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfSegmentReportingInformationBySegmentTable_019e0856-7b28-7be2-9ae7-c81eda4e82ef" xlink:to="loc_us-gaap_StatementBusinessSegmentsAxis_019e0856-7b28-713f-8774-19b9e54f3867" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_019e0856-7b28-713f-8774-19b9e54f3867_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_019e0856-7b28-713f-8774-19b9e54f3867" xlink:to="loc_us-gaap_SegmentDomain_019e0856-7b28-713f-8774-19b9e54f3867_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SegmentDomain_019e0856-7b28-71b6-9d3d-7aaf9a65e530" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_SegmentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementBusinessSegmentsAxis_019e0856-7b28-713f-8774-19b9e54f3867" xlink:to="loc_us-gaap_SegmentDomain_019e0856-7b28-71b6-9d3d-7aaf9a65e530" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_NorthAmericaConfectionerySegmentMember_019e0856-7b28-7946-a087-81d46f6b399e" xlink:href="hsy-20260628.xsd#hsy_NorthAmericaConfectionerySegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_019e0856-7b28-71b6-9d3d-7aaf9a65e530" xlink:to="loc_hsy_NorthAmericaConfectionerySegmentMember_019e0856-7b28-7946-a087-81d46f6b399e" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_NorthAmericaSaltySnacksSegmentMember_019e0856-7b28-7dbb-94cd-2a4981ae16e3" xlink:href="hsy-20260628.xsd#hsy_NorthAmericaSaltySnacksSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_019e0856-7b28-71b6-9d3d-7aaf9a65e530" xlink:to="loc_hsy_NorthAmericaSaltySnacksSegmentMember_019e0856-7b28-7dbb-94cd-2a4981ae16e3" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_InternationalSegmentMember_019e0856-7b28-74fb-bd62-10935fb6a22b" xlink:href="hsy-20260628.xsd#hsy_InternationalSegmentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_019e0856-7b28-71b6-9d3d-7aaf9a65e530" xlink:to="loc_hsy_InternationalSegmentMember_019e0856-7b28-74fb-bd62-10935fb6a22b" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CorporateMember_019e0856-7b28-781a-9012-c022d59a0f15" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CorporateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentDomain_019e0856-7b28-71b6-9d3d-7aaf9a65e530" xlink:to="loc_us-gaap_CorporateMember_019e0856-7b28-781a-9012-c022d59a0f15" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DepreciationDepletionAndAmortization_019e0856-7b28-7e1c-91fd-e9ecf03929f1" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DepreciationDepletionAndAmortization"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SegmentReportingInformationLineItems_019e0856-7b28-7e26-bc9c-3b670c073281" xlink:to="loc_us-gaap_DepreciationDepletionAndAmortization_019e0856-7b28-7e1c-91fd-e9ecf03929f1" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/SEGMENTINFORMATIONSCHEDULEOFSEGMENTINFORMATIONBYGEOGRAPHYDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#SEGMENTINFORMATIONSCHEDULEOFSEGMENTINFORMATIONBYGEOGRAPHYDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/SEGMENTINFORMATIONSCHEDULEOFSEGMENTINFORMATIONBYGEOGRAPHYDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_019e0856-7b28-73db-bf14-e79044d133af" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EntityWideRevenueMajorCustomerLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_019e0856-7b28-75b0-b47a-b78986914cfc" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_019e0856-7b28-73db-bf14-e79044d133af" xlink:to="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_019e0856-7b28-75b0-b47a-b78986914cfc" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_StatementGeographicalAxis_019e0856-7b28-7280-aabd-35231aafa89d" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_StatementGeographicalAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEntityWideRevenueByMajorCustomersByReportingSegmentsTable_019e0856-7b28-75b0-b47a-b78986914cfc" xlink:to="loc_srt_StatementGeographicalAxis_019e0856-7b28-7280-aabd-35231aafa89d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_SegmentGeographicalDomain_019e0856-7b28-7280-aabd-35231aafa89d_default" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_SegmentGeographicalDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementGeographicalAxis_019e0856-7b28-7280-aabd-35231aafa89d" xlink:to="loc_srt_SegmentGeographicalDomain_019e0856-7b28-7280-aabd-35231aafa89d_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_SegmentGeographicalDomain_019e0856-7b28-789c-80cd-a8f746a26a79" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_SegmentGeographicalDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementGeographicalAxis_019e0856-7b28-7280-aabd-35231aafa89d" xlink:to="loc_srt_SegmentGeographicalDomain_019e0856-7b28-789c-80cd-a8f746a26a79" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_country_US_019e0856-7b28-797a-ab59-01dda2864acf" xlink:href="https://xbrl.sec.gov/country/2025/country-2025.xsd#country_US"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_019e0856-7b28-789c-80cd-a8f746a26a79" xlink:to="loc_country_US_019e0856-7b28-797a-ab59-01dda2864acf" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NonUsMember_019e0856-7b28-7f58-aaba-d672c39ccbea" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_NonUsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_SegmentGeographicalDomain_019e0856-7b28-789c-80cd-a8f746a26a79" xlink:to="loc_us-gaap_NonUsMember_019e0856-7b28-7f58-aaba-d672c39ccbea" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_019e0856-7b28-717a-a234-2c65559d498f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EntityWideRevenueMajorCustomerLineItems_019e0856-7b28-73db-bf14-e79044d133af" xlink:to="loc_us-gaap_RevenueFromContractWithCustomerExcludingAssessedTax_019e0856-7b28-717a-a234-2c65559d498f" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/TREASURYSTOCKACTIVITYSCHEDULEOFTREASURYSTOCKACTIVITYDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#TREASURYSTOCKACTIVITYSCHEDULEOFTREASURYSTOCKACTIVITYDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/TREASURYSTOCKACTIVITYSCHEDULEOFTREASURYSTOCKACTIVITYDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockLineItems_019e0856-7b28-76c6-92f0-79dd114b5e23" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ClassOfStockLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfStockByClassTable_019e0856-7b28-7aac-bf06-950def15a980" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfStockByClassTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ClassOfStockLineItems_019e0856-7b28-76c6-92f0-79dd114b5e23" xlink:to="loc_us-gaap_ScheduleOfStockByClassTable_019e0856-7b28-7aac-bf06-950def15a980" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AwardTypeAxis_019e0856-7b28-7dc1-852c-5f2ef41fbc3b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AwardTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_019e0856-7b28-7aac-bf06-950def15a980" xlink:to="loc_us-gaap_AwardTypeAxis_019e0856-7b28-7dc1-852c-5f2ef41fbc3b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-7dc1-852c-5f2ef41fbc3b_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_019e0856-7b28-7dc1-852c-5f2ef41fbc3b" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-7dc1-852c-5f2ef41fbc3b_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-7c36-9e05-be155c9962cb" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_019e0856-7b28-7dc1-852c-5f2ef41fbc3b" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-7c36-9e05-be155c9962cb" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeStockOptionMember_019e0856-7b28-7990-8367-3f69a37eec89" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EmployeeStockOptionMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-7c36-9e05-be155c9962cb" xlink:to="loc_us-gaap_EmployeeStockOptionMember_019e0856-7b28-7990-8367-3f69a37eec89" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_019f80f5-5a6a-7df2-967a-c0cabeb07c64" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfStockByClassTable_019e0856-7b28-7aac-bf06-950def15a980" xlink:to="loc_us-gaap_StatementClassOfStockAxis_019f80f5-5a6a-7df2-967a-c0cabeb07c64" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_019f80f5-5a6a-7df2-967a-c0cabeb07c64_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_019f80f5-5a6a-7df2-967a-c0cabeb07c64" xlink:to="loc_us-gaap_ClassOfStockDomain_019f80f5-5a6a-7df2-967a-c0cabeb07c64_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_019f80f5-5a6a-7108-b42a-bd049521bd03" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_019f80f5-5a6a-7df2-967a-c0cabeb07c64" xlink:to="loc_us-gaap_ClassOfStockDomain_019f80f5-5a6a-7108-b42a-bd049521bd03" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_HersheyCommonStockMember_019f80f5-5a6a-7cb4-8744-d151f8cf966d" xlink:href="hsy-20260628.xsd#hsy_HersheyCommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_019f80f5-5a6a-7108-b42a-bd049521bd03" xlink:to="loc_hsy_HersheyCommonStockMember_019f80f5-5a6a-7cb4-8744-d151f8cf966d" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharebasedCompensationAbstract_019e0856-7b28-7051-8b4d-96ef0bc150e3" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StockIssuedDuringPeriodSharebasedCompensationAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_019e0856-7b28-76c6-92f0-79dd114b5e23" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharebasedCompensationAbstract_019e0856-7b28-7051-8b4d-96ef0bc150e3" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TreasuryStockSharesAcquired_019e0856-7b28-7660-9afe-a50d77b9fb14" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_TreasuryStockSharesAcquired"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockIssuedDuringPeriodSharebasedCompensationAbstract_019e0856-7b28-7051-8b4d-96ef0bc150e3" xlink:to="loc_us-gaap_TreasuryStockSharesAcquired_019e0856-7b28-7660-9afe-a50d77b9fb14" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensationGross_019e0856-7b28-7565-9cad-3c655104fff6" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensationGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockIssuedDuringPeriodSharebasedCompensationAbstract_019e0856-7b28-7051-8b4d-96ef0bc150e3" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensationGross_019e0856-7b28-7565-9cad-3c655104fff6" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_TreasuryStockSharesExcludingExciseTax_019e0856-7b28-76a2-b6d9-4a4c0cb9096f" xlink:href="hsy-20260628.xsd#hsy_TreasuryStockSharesExcludingExciseTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockIssuedDuringPeriodSharebasedCompensationAbstract_019e0856-7b28-7051-8b4d-96ef0bc150e3" xlink:to="loc_hsy_TreasuryStockSharesExcludingExciseTax_019e0856-7b28-76a2-b6d9-4a4c0cb9096f" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_TreasuryStockSharesExciseTax_019f80f5-5a6a-7e75-b44a-3508ca2c07fb" xlink:href="hsy-20260628.xsd#hsy_TreasuryStockSharesExciseTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockIssuedDuringPeriodSharebasedCompensationAbstract_019e0856-7b28-7051-8b4d-96ef0bc150e3" xlink:to="loc_hsy_TreasuryStockSharesExciseTax_019f80f5-5a6a-7e75-b44a-3508ca2c07fb" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_TreasuryStockSharesNetChangeDuringPeriod_019f80f5-5a6a-7978-b6f1-a2f04b22864d" xlink:href="hsy-20260628.xsd#hsy_TreasuryStockSharesNetChangeDuringPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StockIssuedDuringPeriodSharebasedCompensationAbstract_019e0856-7b28-7051-8b4d-96ef0bc150e3" xlink:to="loc_hsy_TreasuryStockSharesNetChangeDuringPeriod_019f80f5-5a6a-7978-b6f1-a2f04b22864d" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ShareRepurchaseProgramAbstract_019e0856-7b28-7263-886f-8a0e5b4973e2" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ShareRepurchaseProgramAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockLineItems_019e0856-7b28-76c6-92f0-79dd114b5e23" xlink:to="loc_srt_ShareRepurchaseProgramAbstract_019e0856-7b28-7263-886f-8a0e5b4973e2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockRepurchasedDuringPeriodValue_019e0856-7b28-792a-8d03-ba848e8a87ca" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StockRepurchasedDuringPeriodValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ShareRepurchaseProgramAbstract_019e0856-7b28-7263-886f-8a0e5b4973e2" xlink:to="loc_us-gaap_StockRepurchasedDuringPeriodValue_019e0856-7b28-792a-8d03-ba848e8a87ca" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueShareBasedCompensationGross_019e0856-7b28-7ca6-a538-d13f73116f6c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StockIssuedDuringPeriodValueShareBasedCompensationGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ShareRepurchaseProgramAbstract_019e0856-7b28-7263-886f-8a0e5b4973e2" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueShareBasedCompensationGross_019e0856-7b28-7ca6-a538-d13f73116f6c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_TreasuryStockValueExcludingExciseTax_019e0856-7b28-70b1-8652-b847146811af" xlink:href="hsy-20260628.xsd#hsy_TreasuryStockValueExcludingExciseTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ShareRepurchaseProgramAbstract_019e0856-7b28-7263-886f-8a0e5b4973e2" xlink:to="loc_hsy_TreasuryStockValueExcludingExciseTax_019e0856-7b28-70b1-8652-b847146811af" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_TreasuryStockValueExciseTax_019f80f5-5a6a-79fb-bc82-c9829e752fa8" xlink:href="hsy-20260628.xsd#hsy_TreasuryStockValueExciseTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ShareRepurchaseProgramAbstract_019e0856-7b28-7263-886f-8a0e5b4973e2" xlink:to="loc_hsy_TreasuryStockValueExciseTax_019f80f5-5a6a-79fb-bc82-c9829e752fa8" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_TreasuryStockAmountNetChangeDuringPeriod_019f80f5-5a6a-7b45-af3a-33ce846d05b9" xlink:href="hsy-20260628.xsd#hsy_TreasuryStockAmountNetChangeDuringPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ShareRepurchaseProgramAbstract_019e0856-7b28-7263-886f-8a0e5b4973e2" xlink:to="loc_hsy_TreasuryStockAmountNetChangeDuringPeriod_019f80f5-5a6a-7b45-af3a-33ce846d05b9" xlink:type="arc" order="5"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/TREASURYSTOCKACTIVITYNARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#TREASURYSTOCKACTIVITYNARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/TREASURYSTOCKACTIVITYNARRATIVEDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityClassOfTreasuryStockLineItems_019e0856-7b28-72d3-87fd-24c377984e7b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EquityClassOfTreasuryStockLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfTreasuryStockTable_019e0856-7b28-7545-8409-7dc023ef5e21" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ClassOfTreasuryStockTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EquityClassOfTreasuryStockLineItems_019e0856-7b28-72d3-87fd-24c377984e7b" xlink:to="loc_us-gaap_ClassOfTreasuryStockTable_019e0856-7b28-7545-8409-7dc023ef5e21" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ShareRepurchaseProgramAxis_019e0856-7b28-7299-8f67-504b37f74637" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ShareRepurchaseProgramAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ClassOfTreasuryStockTable_019e0856-7b28-7545-8409-7dc023ef5e21" xlink:to="loc_srt_ShareRepurchaseProgramAxis_019e0856-7b28-7299-8f67-504b37f74637" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ShareRepurchaseProgramDomain_019e0856-7b28-7299-8f67-504b37f74637_default" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ShareRepurchaseProgramDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_ShareRepurchaseProgramAxis_019e0856-7b28-7299-8f67-504b37f74637" xlink:to="loc_srt_ShareRepurchaseProgramDomain_019e0856-7b28-7299-8f67-504b37f74637_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ShareRepurchaseProgramDomain_019e0856-7b28-775d-9fd5-8705945d438d" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_ShareRepurchaseProgramDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_ShareRepurchaseProgramAxis_019e0856-7b28-7299-8f67-504b37f74637" xlink:to="loc_srt_ShareRepurchaseProgramDomain_019e0856-7b28-775d-9fd5-8705945d438d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_A2023ShareRepurchaseProgramMember_019e0856-7b28-7ce5-a862-b3f4a8cd55e2" xlink:href="hsy-20260628.xsd#hsy_A2023ShareRepurchaseProgramMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ShareRepurchaseProgramDomain_019e0856-7b28-775d-9fd5-8705945d438d" xlink:to="loc_hsy_A2023ShareRepurchaseProgramMember_019e0856-7b28-7ce5-a862-b3f4a8cd55e2" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_A2026ShareRepurchaseProgramMember_019f8116-35a1-7a8d-b348-55ff8efb5cba" xlink:href="hsy-20260628.xsd#hsy_A2026ShareRepurchaseProgramMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ShareRepurchaseProgramDomain_019e0856-7b28-775d-9fd5-8705945d438d" xlink:to="loc_hsy_A2026ShareRepurchaseProgramMember_019f8116-35a1-7a8d-b348-55ff8efb5cba" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_StockRepurchaseProgramAuthorizedAmount1_019e0856-7b28-71e4-be7e-f7023bed499b" xlink:href="https://xbrl.fasb.org/srt/2025/elts/srt-2025.xsd#srt_StockRepurchaseProgramAuthorizedAmount1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityClassOfTreasuryStockLineItems_019e0856-7b28-72d3-87fd-24c377984e7b" xlink:to="loc_srt_StockRepurchaseProgramAuthorizedAmount1_019e0856-7b28-71e4-be7e-f7023bed499b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockRepurchaseProgramRemainingAuthorizedRepurchaseAmount1_019e0856-7b28-7b23-a5a4-bac28d127181" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StockRepurchaseProgramRemainingAuthorizedRepurchaseAmount1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityClassOfTreasuryStockLineItems_019e0856-7b28-72d3-87fd-24c377984e7b" xlink:to="loc_us-gaap_StockRepurchaseProgramRemainingAuthorizedRepurchaseAmount1_019e0856-7b28-7b23-a5a4-bac28d127181" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/EARNINGSPERSHARESCHEDULEOFBASICANDDILUTEDEARNINGSPERSHAREDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#EARNINGSPERSHARESCHEDULEOFBASICANDDILUTEDEARNINGSPERSHAREDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/EARNINGSPERSHARESCHEDULEOFBASICANDDILUTEDEARNINGSPERSHAREDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareBasicLineItems_019e0856-7b28-73c9-bf90-1a03480d3ce0" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EarningsPerShareBasicLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable_019e0856-7b28-74c3-863c-19abaac4dada" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_EarningsPerShareBasicLineItems_019e0856-7b28-73c9-bf90-1a03480d3ce0" xlink:to="loc_us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable_019e0856-7b28-74c3-863c-19abaac4dada" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_019e0856-7b28-7400-88b0-bb2f9d6aaf27" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable_019e0856-7b28-74c3-863c-19abaac4dada" xlink:to="loc_us-gaap_StatementClassOfStockAxis_019e0856-7b28-7400-88b0-bb2f9d6aaf27" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_019e0856-7b28-7400-88b0-bb2f9d6aaf27_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_019e0856-7b28-7400-88b0-bb2f9d6aaf27" xlink:to="loc_us-gaap_ClassOfStockDomain_019e0856-7b28-7400-88b0-bb2f9d6aaf27_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_019e0856-7b28-7427-9409-fa0e6443736f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_019e0856-7b28-7400-88b0-bb2f9d6aaf27" xlink:to="loc_us-gaap_ClassOfStockDomain_019e0856-7b28-7427-9409-fa0e6443736f" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_019e0856-7b28-7a7b-b71e-cc7fbf03d50b" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_019e0856-7b28-7427-9409-fa0e6443736f" xlink:to="loc_us-gaap_CommonStockMember_019e0856-7b28-7a7b-b71e-cc7fbf03d50b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassBMember_019e0856-7b28-7667-abf6-ba9761e44be4" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonClassBMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_019e0856-7b28-7427-9409-fa0e6443736f" xlink:to="loc_us-gaap_CommonClassBMember_019e0856-7b28-7667-abf6-ba9761e44be4" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AwardTypeAxis_019e0856-7b28-7f1b-84c2-3a4cfd521c39" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AwardTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfEarningsPerShareBasicByCommonClassTable_019e0856-7b28-74c3-863c-19abaac4dada" xlink:to="loc_us-gaap_AwardTypeAxis_019e0856-7b28-7f1b-84c2-3a4cfd521c39" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-7f1b-84c2-3a4cfd521c39_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_019e0856-7b28-7f1b-84c2-3a4cfd521c39" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-7f1b-84c2-3a4cfd521c39_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-7f33-9b2d-ac6e4f907b72" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_019e0856-7b28-7f1b-84c2-3a4cfd521c39" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-7f33-9b2d-ac6e4f907b72" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeStockOptionMember_019e0856-7b28-7aa4-8ecb-f592956fdd25" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EmployeeStockOptionMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-7f33-9b2d-ac6e4f907b72" xlink:to="loc_us-gaap_EmployeeStockOptionMember_019e0856-7b28-7aa4-8ecb-f592956fdd25" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_019e0856-7b28-7a39-8274-292d9f6ca20d" xlink:href="hsy-20260628.xsd#hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_019e0856-7b28-7f33-9b2d-ac6e4f907b72" xlink:to="loc_hsy_PerformanceSharesAndRestrictedStockUnitsRSUMember_019e0856-7b28-7a39-8274-292d9f6ca20d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_019e0856-7b28-7844-9c66-1e3bafef62a4" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EarningsPerShareBasicTwoClassMethodAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicLineItems_019e0856-7b28-73c9-bf90-1a03480d3ce0" xlink:to="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_019e0856-7b28-7844-9c66-1e3bafef62a4" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Dividends_019e0856-7b28-76e8-b0cf-279d55a03cf9" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_Dividends"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_019e0856-7b28-7844-9c66-1e3bafef62a4" xlink:to="loc_us-gaap_Dividends_019e0856-7b28-76e8-b0cf-279d55a03cf9" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic_019e0856-7b28-7cf0-a47b-9155249131fc" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_019e0856-7b28-7844-9c66-1e3bafef62a4" xlink:to="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesBasic_019e0856-7b28-7cf0-a47b-9155249131fc" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_019e0856-7b28-7368-aa93-952aba08fa79" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_019e0856-7b28-7844-9c66-1e3bafef62a4" xlink:to="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_019e0856-7b28-7368-aa93-952aba08fa79" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_019e0856-7b28-71fd-985c-743f6b6ac5da" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_WeightedAverageNumberOfSharesOutstandingBasic"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_019e0856-7b28-7844-9c66-1e3bafef62a4" xlink:to="loc_us-gaap_WeightedAverageNumberOfSharesOutstandingBasic_019e0856-7b28-71fd-985c-743f6b6ac5da" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareBasic_019e0856-7b28-7922-a051-30c4d6359365" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EarningsPerShareBasic"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicTwoClassMethodAbstract_019e0856-7b28-7844-9c66-1e3bafef62a4" xlink:to="loc_us-gaap_EarningsPerShareBasic_019e0856-7b28-7922-a051-30c4d6359365" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_019e0856-7b28-7f9e-b35b-3178faa60651" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareBasicLineItems_019e0856-7b28-73c9-bf90-1a03480d3ce0" xlink:to="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_019e0856-7b28-7f9e-b35b-3178faa60651" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic_019e0856-7b28-7a56-95b0-746cec10ec41" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossBasic"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DistributedEarnings_019e0856-7b28-7837-a77b-66982f9a8135" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_DistributedEarnings"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_019e0856-7b28-7f9e-b35b-3178faa60651" xlink:to="loc_us-gaap_DistributedEarnings_019e0856-7b28-7837-a77b-66982f9a8135" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted_019e0856-7b28-78d3-8a58-7fc6fb462c2f" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_019e0856-7b28-7f9e-b35b-3178faa60651" xlink:to="loc_us-gaap_UndistributedEarningsLossAllocatedToParticipatingSecuritiesDiluted_019e0856-7b28-78d3-8a58-7fc6fb462c2f" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_019e0856-7b28-7bee-80d7-05f7c2db8da8" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_019e0856-7b28-7f9e-b35b-3178faa60651" xlink:to="loc_us-gaap_ParticipatingSecuritiesDistributedAndUndistributedEarningsLossDiluted_019e0856-7b28-7bee-80d7-05f7c2db8da8" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_IncrementalCommonSharesAttributabletoDilutiveEffectofConversionofCommonStock_019e0856-7b28-7962-a3a3-598cd20b957e" xlink:href="hsy-20260628.xsd#hsy_IncrementalCommonSharesAttributabletoDilutiveEffectofConversionofCommonStock"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_019e0856-7b28-7f9e-b35b-3178faa60651" xlink:to="loc_hsy_IncrementalCommonSharesAttributabletoDilutiveEffectofConversionofCommonStock_019e0856-7b28-7962-a3a3-598cd20b957e" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_019e0856-7b28-7c1a-a31e-335de35e8a60" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_019e0856-7b28-7f9e-b35b-3178faa60651" xlink:to="loc_us-gaap_IncrementalCommonSharesAttributableToShareBasedPaymentArrangements_019e0856-7b28-7c1a-a31e-335de35e8a60" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_019e0856-7b28-723f-ae5f-ad19ec99d6c2" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_019e0856-7b28-7f9e-b35b-3178faa60651" xlink:to="loc_us-gaap_WeightedAverageNumberOfDilutedSharesOutstanding_019e0856-7b28-723f-ae5f-ad19ec99d6c2" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EarningsPerShareDiluted_019e0856-7b28-71ca-a42c-e1dd128aca09" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EarningsPerShareDiluted"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EarningsPerShareDilutedTwoClassMethodAbstract_019e0856-7b28-7f9e-b35b-3178faa60651" xlink:to="loc_us-gaap_EarningsPerShareDiluted_019e0856-7b28-71ca-a42c-e1dd128aca09" xlink:type="arc" order="8"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.hersheys.com/role/EARNINGSPERSHARENARRATIVEDetails" xlink:type="simple" xlink:href="hsy-20260628.xsd#EARNINGSPERSHARENARRATIVEDetails"/>
  <link:definitionLink xlink:role="http://www.hersheys.com/role/EARNINGSPERSHARENARRATIVEDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_019e0856-7b28-78f7-90ba-848001d7d232" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_019e0856-7b28-78c0-9a9d-68d07f29c042" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_019e0856-7b28-78f7-90ba-848001d7d232" xlink:to="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_019e0856-7b28-78c0-9a9d-68d07f29c042" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_019e0856-7b28-7766-bf0c-3b7d201e1027" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_019e0856-7b28-78c0-9a9d-68d07f29c042" xlink:to="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_019e0856-7b28-7766-bf0c-3b7d201e1027" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AntidilutiveSecuritiesNameDomain_019e0856-7b28-7766-bf0c-3b7d201e1027_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AntidilutiveSecuritiesNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_019e0856-7b28-7766-bf0c-3b7d201e1027" xlink:to="loc_us-gaap_AntidilutiveSecuritiesNameDomain_019e0856-7b28-7766-bf0c-3b7d201e1027_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AntidilutiveSecuritiesNameDomain_019e0856-7b28-79bb-b1ea-d663f820505c" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AntidilutiveSecuritiesNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareByAntidilutiveSecuritiesAxis_019e0856-7b28-7766-bf0c-3b7d201e1027" xlink:to="loc_us-gaap_AntidilutiveSecuritiesNameDomain_019e0856-7b28-79bb-b1ea-d663f820505c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeStockOptionMember_019e0856-7b28-74f9-a72d-18f7f8ab44be" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_EmployeeStockOptionMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesNameDomain_019e0856-7b28-79bb-b1ea-d663f820505c" xlink:to="loc_us-gaap_EmployeeStockOptionMember_019e0856-7b28-74f9-a72d-18f7f8ab44be" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementClassOfStockAxis_019e0856-7b28-7308-88e1-e3927b3bdb10" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_StatementClassOfStockAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfAntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareTable_019e0856-7b28-78c0-9a9d-68d07f29c042" xlink:to="loc_us-gaap_StatementClassOfStockAxis_019e0856-7b28-7308-88e1-e3927b3bdb10" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_019e0856-7b28-7308-88e1-e3927b3bdb10_default" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementClassOfStockAxis_019e0856-7b28-7308-88e1-e3927b3bdb10" xlink:to="loc_us-gaap_ClassOfStockDomain_019e0856-7b28-7308-88e1-e3927b3bdb10_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ClassOfStockDomain_019e0856-7b28-7493-9612-6dceb6457c65" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_ClassOfStockDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementClassOfStockAxis_019e0856-7b28-7308-88e1-e3927b3bdb10" xlink:to="loc_us-gaap_ClassOfStockDomain_019e0856-7b28-7493-9612-6dceb6457c65" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonClassBMember_019e0856-7b28-7841-b46f-8c2c60c36f8a" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_CommonClassBMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ClassOfStockDomain_019e0856-7b28-7493-9612-6dceb6457c65" xlink:to="loc_us-gaap_CommonClassBMember_019e0856-7b28-7841-b46f-8c2c60c36f8a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount_019e0856-7b28-7396-adc0-b71a3b3ccbe9" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareLineItems_019e0856-7b28-78f7-90ba-848001d7d232" xlink:to="loc_us-gaap_AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount_019e0856-7b28-7396-adc0-b71a3b3ccbe9" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://fasb.org/us-gaap/role/eedm/ExtensibleEnumerationLists" xlink:type="simple" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-roles-2025.xsd#eedm"/>
  <link:definitionLink xlink:role="http://fasb.org/us-gaap/role/eedm/ExtensibleEnumerationLists" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrentAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_LiabilitiesCurrentAbstract"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccruedLiabilitiesCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2025/elts/us-gaap-2025.xsd#us-gaap_AccruedLiabilitiesCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract" xlink:to="loc_us-gaap_AccruedLiabilitiesCurrent" xlink:type="arc" order="41"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://xbrl.sec.gov/ecd/role/IndividualsOnly" xlink:type="simple" xlink:href="https://xbrl.sec.gov/ecd/2025/ecd-2025.xsd#IndividualsOnly"/>
  <link:definitionLink xlink:role="http://xbrl.sec.gov/ecd/role/IndividualsOnly" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_ecd_AllIndividualsMember" xlink:href="https://xbrl.sec.gov/ecd/2025/ecd-2025.xsd#ecd_AllIndividualsMember"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_RohitGroverMember_019f80e0-7e9a-7ff2-83cc-197a3c97a724" xlink:href="hsy-20260628.xsd#hsy_RohitGroverMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ecd_AllIndividualsMember" xlink:to="loc_hsy_RohitGroverMember_019f80e0-7e9a-7ff2-83cc-197a3c97a724" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_JenniferL.McCalmanMember_019f80e0-e0d7-79b0-b920-2dff597722f9" xlink:href="hsy-20260628.xsd#hsy_JenniferL.McCalmanMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ecd_AllIndividualsMember" xlink:to="loc_hsy_JenniferL.McCalmanMember_019f80e0-e0d7-79b0-b920-2dff597722f9" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_JasonR.ReimanMember_019e0856-7b28-7550-94f2-54167a776cc9" xlink:href="hsy-20260628.xsd#hsy_JasonR.ReimanMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ecd_AllIndividualsMember" xlink:to="loc_hsy_JasonR.ReimanMember_019e0856-7b28-7550-94f2-54167a776cc9" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_StevenE.VoskuilMember_019f80e1-6b28-7b1a-9e71-9860fff54ae8" xlink:href="hsy-20260628.xsd#hsy_StevenE.VoskuilMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ecd_AllIndividualsMember" xlink:to="loc_hsy_StevenE.VoskuilMember_019f80e1-6b28-7b1a-9e71-9860fff54ae8" xlink:type="arc" order="5"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://xbrl.sec.gov/ecd/role/TradingArrangementsOnly" xlink:type="simple" xlink:href="https://xbrl.sec.gov/ecd/2025/ecd-2025.xsd#TradingArrangmentsOnly"/>
  <link:definitionLink xlink:role="http://xbrl.sec.gov/ecd/role/TradingArrangementsOnly" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_ecd_AllTradingArrangementsMember" xlink:href="https://xbrl.sec.gov/ecd/2025/ecd-2025.xsd#ecd_AllTradingArrangementsMember"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_JasonR.ReimanTradingArrangementCommonStockMember_019f80ee-92d8-7601-9691-3923759376ec" xlink:href="hsy-20260628.xsd#hsy_JasonR.ReimanTradingArrangementCommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ecd_AllTradingArrangementsMember" xlink:to="loc_hsy_JasonR.ReimanTradingArrangementCommonStockMember_019f80ee-92d8-7601-9691-3923759376ec" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_hsy_JasonR.ReimanTradingArrangementStockOptionsMember_019f80ef-7aed-74a7-98eb-83c03c15945b" xlink:href="hsy-20260628.xsd#hsy_JasonR.ReimanTradingArrangementStockOptionsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ecd_AllTradingArrangementsMember" xlink:to="loc_hsy_JasonR.ReimanTradingArrangementStockOptionsMember_019f80ef-7aed-74a7-98eb-83c03c15945b" xlink:type="arc" order="2"/>
  </link:definitionLink>
</link:linkbase>
