<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2023"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="spro-20240909.xsd" xlink:type="simple"/>
    <context id="duration_2024-09-09_to_2024-09-09">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001701108</identifier>
        </entity>
        <period>
            <startDate>2024-09-09</startDate>
            <endDate>2024-09-09</endDate>
        </period>
    </context>
    <dei:Security12bTitle
      contextRef="duration_2024-09-09_to_2024-09-09"
      id="Hidden_dei_Security12bTitle">Common Stock, $0.001 par value per share</dei:Security12bTitle>
    <dei:AmendmentFlag contextRef="duration_2024-09-09_to_2024-09-09" id="ixv-264">false</dei:AmendmentFlag>
    <dei:EntityCentralIndexKey
      contextRef="duration_2024-09-09_to_2024-09-09"
      id="Hidden_dei_EntityCentralIndexKey">0001701108</dei:EntityCentralIndexKey>
    <dei:DocumentType contextRef="duration_2024-09-09_to_2024-09-09" id="ixv-275">8-K</dei:DocumentType>
    <dei:DocumentPeriodEndDate contextRef="duration_2024-09-09_to_2024-09-09" id="ixv-276">2024-09-09</dei:DocumentPeriodEndDate>
    <dei:EntityRegistrantName contextRef="duration_2024-09-09_to_2024-09-09" id="ixv-277">SPERO THERAPEUTICS, INC.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode contextRef="duration_2024-09-09_to_2024-09-09" id="ixv-278">DE</dei:EntityIncorporationStateCountryCode>
    <dei:EntityFileNumber contextRef="duration_2024-09-09_to_2024-09-09" id="ixv-279">001-38266</dei:EntityFileNumber>
    <dei:EntityTaxIdentificationNumber contextRef="duration_2024-09-09_to_2024-09-09" id="ixv-280">46-4590683</dei:EntityTaxIdentificationNumber>
    <dei:EntityAddressAddressLine1 contextRef="duration_2024-09-09_to_2024-09-09" id="ixv-281">675 Massachusetts Avenue</dei:EntityAddressAddressLine1>
    <dei:EntityAddressAddressLine2 contextRef="duration_2024-09-09_to_2024-09-09" id="ixv-71">14th Floor</dei:EntityAddressAddressLine2>
    <dei:EntityAddressCityOrTown contextRef="duration_2024-09-09_to_2024-09-09" id="ixv-282">Cambridge</dei:EntityAddressCityOrTown>
    <dei:EntityAddressStateOrProvince contextRef="duration_2024-09-09_to_2024-09-09" id="ixv-283">MA</dei:EntityAddressStateOrProvince>
    <dei:EntityAddressPostalZipCode contextRef="duration_2024-09-09_to_2024-09-09" id="ixv-284">02139</dei:EntityAddressPostalZipCode>
    <dei:CityAreaCode contextRef="duration_2024-09-09_to_2024-09-09" id="ixv-285">(857)</dei:CityAreaCode>
    <dei:LocalPhoneNumber contextRef="duration_2024-09-09_to_2024-09-09" id="ixv-286">242-1600</dei:LocalPhoneNumber>
    <dei:WrittenCommunications contextRef="duration_2024-09-09_to_2024-09-09" id="ixv-287">false</dei:WrittenCommunications>
    <dei:SolicitingMaterial contextRef="duration_2024-09-09_to_2024-09-09" id="ixv-288">false</dei:SolicitingMaterial>
    <dei:PreCommencementTenderOffer contextRef="duration_2024-09-09_to_2024-09-09" id="ixv-289">false</dei:PreCommencementTenderOffer>
    <dei:PreCommencementIssuerTenderOffer contextRef="duration_2024-09-09_to_2024-09-09" id="ixv-290">false</dei:PreCommencementIssuerTenderOffer>
    <dei:TradingSymbol contextRef="duration_2024-09-09_to_2024-09-09" id="ixv-291">SPRO</dei:TradingSymbol>
    <dei:SecurityExchangeName contextRef="duration_2024-09-09_to_2024-09-09" id="ixv-292">NASDAQ</dei:SecurityExchangeName>
    <dei:EntityEmergingGrowthCompany contextRef="duration_2024-09-09_to_2024-09-09" id="ixv-293">false</dei:EntityEmergingGrowthCompany>
</xbrl>
