<?xml version='1.0' encoding='utf-8'?>
<FilingSummary>
  <Version>3.19.3.a.u2</Version>
  <ProcessingTime/>
  <ReportFormat>html</ReportFormat>
  <ContextCount>24</ContextCount>
  <ElementCount>156</ElementCount>
  <EntityCount>1</EntityCount>
  <FootnotesReported>true</FootnotesReported>
  <SegmentCount>17</SegmentCount>
  <ScenarioCount>0</ScenarioCount>
  <TuplesReported>false</TuplesReported>
  <UnitCount>2</UnitCount>
  <MyReports>
    <Report instance="ck0000875732-20200227.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R1.htm</HtmlFileName>
      <LongName>000001 - Document - Document and Entity Information</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bny.com/20200227/role/DocumentAndEntityInformation</Role>
      <ShortName>Document and Entity Information</ShortName>
      <MenuCategory></MenuCategory>
      <Position>1</Position>
    </Report>
    <Report instance="ck0000875732-20200227.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>true</HasEmbeddedReports>
      <HtmlFileName>R2.htm</HtmlFileName>
      <LongName>020000 - Document - Risk/Return Summary {Unlabeled} - BNY Mellon S&amp;P 500 Index Fund</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bny.com/20200227/role/DocumentRiskReturnSummaryUnlabeledBNYMellonSP500IndexFund</Role>
      <ShortName>Risk/Return Summary- BNY Mellon S&amp;P 500 Index Fund</ShortName>
      <MenuCategory></MenuCategory>
      <Position>2</Position>
    </Report>
    <Report instance="ck0000875732-20200227.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R8.htm</HtmlFileName>
      <LongName>020006 - Disclosure - Risk/Return Detail Data {Elements} - BNY Mellon S&amp;P 500 Index Fund</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bny.com/20200227/role/DisclosureRiskReturnDetailDataElementsBNYMellonSP500IndexFund</Role>
      <ShortName>Risk/Return Detail Data- BNY Mellon S&amp;P 500 Index Fund</ShortName>
      <MenuCategory></MenuCategory>
      <Position>3</Position>
    </Report>
    <Report instance="ck0000875732-20200227.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>true</HasEmbeddedReports>
      <HtmlFileName>R9.htm</HtmlFileName>
      <LongName>020007 - Document - Risk/Return Summary {Unlabeled} - BNY Mellon Midcap Index Fund, Inc.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bny.com/20200227/role/DocumentRiskReturnSummaryUnlabeledBNYMellonMidcapIndexFundInc</Role>
      <ShortName>Risk/Return Summary- BNY Mellon Midcap Index Fund, Inc.</ShortName>
      <MenuCategory></MenuCategory>
      <Position>4</Position>
    </Report>
    <Report instance="ck0000875732-20200227.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R15.htm</HtmlFileName>
      <LongName>020013 - Disclosure - Risk/Return Detail Data {Elements} - BNY Mellon Midcap Index Fund, Inc.</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bny.com/20200227/role/DisclosureRiskReturnDetailDataElementsBNYMellonMidcapIndexFundInc</Role>
      <ShortName>Risk/Return Detail Data- BNY Mellon Midcap Index Fund, Inc.</ShortName>
      <MenuCategory></MenuCategory>
      <Position>5</Position>
    </Report>
    <Report instance="ck0000875732-20200227.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>true</HasEmbeddedReports>
      <HtmlFileName>R16.htm</HtmlFileName>
      <LongName>020014 - Document - Risk/Return Summary {Unlabeled} - BNY Mellon Smallcap Stock Index Fund</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bny.com/20200227/role/DocumentRiskReturnSummaryUnlabeledBNYMellonSmallcapStockIndexFund</Role>
      <ShortName>Risk/Return Summary- BNY Mellon Smallcap Stock Index Fund</ShortName>
      <MenuCategory></MenuCategory>
      <Position>6</Position>
    </Report>
    <Report instance="ck0000875732-20200227.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R22.htm</HtmlFileName>
      <LongName>020020 - Disclosure - Risk/Return Detail Data {Elements} - BNY Mellon Smallcap Stock Index Fund</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bny.com/20200227/role/DisclosureRiskReturnDetailDataElementsBNYMellonSmallcapStockIndexFund</Role>
      <ShortName>Risk/Return Detail Data- BNY Mellon Smallcap Stock Index Fund</ShortName>
      <MenuCategory></MenuCategory>
      <Position>7</Position>
    </Report>
    <Report instance="ck0000875732-20200227.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>true</HasEmbeddedReports>
      <HtmlFileName>R23.htm</HtmlFileName>
      <LongName>020021 - Document - Risk/Return Summary {Unlabeled} - BNY Mellon International Stock Index Fund</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bny.com/20200227/role/DocumentRiskReturnSummaryUnlabeledBNYMellonInternationalStockIndexFund</Role>
      <ShortName>Risk/Return Summary- BNY Mellon International Stock Index Fund</ShortName>
      <MenuCategory></MenuCategory>
      <Position>8</Position>
    </Report>
    <Report instance="ck0000875732-20200227.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R29.htm</HtmlFileName>
      <LongName>020027 - Disclosure - Risk/Return Detail Data {Elements} - BNY Mellon International Stock Index Fund</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://www.bny.com/20200227/role/DisclosureRiskReturnDetailDataElementsBNYMellonInternationalStockIndexFund</Role>
      <ShortName>Risk/Return Detail Data- BNY Mellon International Stock Index Fund</ShortName>
      <MenuCategory></MenuCategory>
      <Position>9</Position>
    </Report>
    <Report instance="ck0000875732-20200227.xml">
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <HtmlFileName>R30.htm</HtmlFileName>
      <LongName>040000 - Disclosure - Risk/Return Detail Data {Elements}</LongName>
      <ReportType>Sheet</ReportType>
      <Role>http://xbrl.sec.gov/rr/role/RiskReturnDetailData</Role>
      <ShortName>Risk/Return Detail Data</ShortName>
      <MenuCategory></MenuCategory>
      <Position>10</Position>
    </Report>
    <Report>
      <IsDefault>false</IsDefault>
      <HasEmbeddedReports>false</HasEmbeddedReports>
      <LongName>All Reports</LongName>
      <ReportType>Book</ReportType>
      <ShortName>All Reports</ShortName>
    </Report>
  </MyReports>
  <InputFiles>
    <File>ck0000875732-20200227.xml</File>
    <File>ck0000875732-20200227.xsd</File>
    <File>ck0000875732-20200227_cal.xml</File>
    <File>ck0000875732-20200227_def.xml</File>
    <File>ck0000875732-20200227_lab.xml</File>
    <File>ck0000875732-20200227_pre.xml</File>
  </InputFiles>
  <SupplementalFiles>
    <File>BarChart1.png</File>
    <File>BarChart2.png</File>
    <File>BarChart3.png</File>
    <File>BarChart4.png</File>
  </SupplementalFiles>
  <BaseTaxonomies>
    <BaseTaxonomy>http://xbrl.sec.gov/dei/2018-01-31</BaseTaxonomy>
    <BaseTaxonomy>http://xbrl.sec.gov/rr/2018-01-31</BaseTaxonomy>
  </BaseTaxonomies>
  <HasPresentationLinkbase>true</HasPresentationLinkbase>
  <HasCalculationLinkbase>true</HasCalculationLinkbase>
</FilingSummary>
