<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2025"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="spro-20260623.xsd" xlink:type="simple"/>
    <context id="duration_2026-06-23_to_2026-06-23">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001701108</identifier>
        </entity>
        <period>
            <startDate>2026-06-23</startDate>
            <endDate>2026-06-23</endDate>
        </period>
    </context>
    <dei:AmendmentFlag contextRef="duration_2026-06-23_to_2026-06-23" id="ixv-518">false</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey
      contextRef="duration_2026-06-23_to_2026-06-23"
      id="Hidden_dei_EntityCentralIndexKey">0001701108</dei:EntityCentralIndexKey>
    <dei:CurrentFiscalYearEndDate
      contextRef="duration_2026-06-23_to_2026-06-23"
      id="Hidden_dei_CurrentFiscalYearEndDate_duration_2026-06-23_to_2026-06-23">--12-31</dei:CurrentFiscalYearEndDate>
    <dei:DocumentType contextRef="duration_2026-06-23_to_2026-06-23" id="ixv-530">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate contextRef="duration_2026-06-23_to_2026-06-23" id="ixv-531">2026-06-23</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName contextRef="duration_2026-06-23_to_2026-06-23" id="ixv-532">SPERO THERAPEUTICS, INC.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode contextRef="duration_2026-06-23_to_2026-06-23" id="ixv-533">DE</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber contextRef="duration_2026-06-23_to_2026-06-23" id="ixv-534">001-38266</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber contextRef="duration_2026-06-23_to_2026-06-23" id="ixv-535">46-4590683</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1 contextRef="duration_2026-06-23_to_2026-06-23" id="ixv-536">675 Massachusetts Avenue</dei:EntityAddressAddressLine1>
    <dei:EntityAddressAddressLine2 contextRef="duration_2026-06-23_to_2026-06-23" id="ixv-71">14th Floor</dei:EntityAddressAddressLine2>
    <dei:EntityAddressCityOrTown contextRef="duration_2026-06-23_to_2026-06-23" id="ixv-537">Cambridge</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince contextRef="duration_2026-06-23_to_2026-06-23" id="ixv-538">MA</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode contextRef="duration_2026-06-23_to_2026-06-23" id="ixv-539">02139</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode contextRef="duration_2026-06-23_to_2026-06-23" id="ixv-540">(857)</dei:CityAreaCode>
    <dei:LocalPhoneNumber contextRef="duration_2026-06-23_to_2026-06-23" id="ixv-541">242-1600</dei:LocalPhoneNumber>
    <dei:WrittenCommunications contextRef="duration_2026-06-23_to_2026-06-23" id="ixv-542">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial contextRef="duration_2026-06-23_to_2026-06-23" id="ixv-543">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer contextRef="duration_2026-06-23_to_2026-06-23" id="ixv-544">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer contextRef="duration_2026-06-23_to_2026-06-23" id="ixv-545">false</dei:PreCommencementIssuerTenderOffer>
    <dei:Security12bTitle contextRef="duration_2026-06-23_to_2026-06-23" id="ixv-546">Common Stock, $0.001 par value</dei:Security12bTitle>
    <dei:TradingSymbol contextRef="duration_2026-06-23_to_2026-06-23" id="ixv-547">SPRO</dei:TradingSymbol>
    <dei:SecurityExchangeName contextRef="duration_2026-06-23_to_2026-06-23" id="ixv-548">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany contextRef="duration_2026-06-23_to_2026-06-23" id="ixv-549">false</dei:EntityEmergingGrowthCompany>
</xbrl>
