<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0202</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2007-06-26</periodOfReport>

    <issuer>
        <issuerCik>0001100813</issuerCik>
        <issuerName>OPSWARE INC</issuerName>
        <issuerTradingSymbol>OPSW</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001191715</rptOwnerCik>
            <rptOwnerName>OVITZ MICHAEL S</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>2601 COLORADO AVENUE</rptOwnerStreet1>
            <rptOwnerStreet2></rptOwnerStreet2>
            <rptOwnerCity>SANTA MONICA</rptOwnerCity>
            <rptOwnerState>CA</rptOwnerState>
            <rptOwnerZipCode>90404</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <derivativeTable>
        <derivativeTransaction>
            <securityTitle>
                <value>Employee stock option (right to buy)</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>9.28</value>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2007-06-26</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
                <footnoteId id="F1"/>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>25000</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <value>2008-06-26</value>
                <footnoteId id="F2"/>
            </exerciseDate>
            <expirationDate>
                <value>2017-06-25</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Common stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>25000</value>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>25000</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </derivativeTransaction>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">In accordance with the Opsware Inc. 2000 Incentive Stock Plan, each outside director continuing to serve on the Board of Directors is issued an automatic formulaic option grant on the day of Opsware's annual shareholder meeting.</footnote>
        <footnote id="F2">One-fourth of the shares subject to the option are exercisable on June 26, 2008; one forty-eighth of the shares are exercisable monthly thereafter for a total vesting period of four years.</footnote>
    </footnotes>

    <remarks></remarks>

    <ownerSignature>
        <signatureName>/s/ Michael S. Ovitz</signatureName>
        <signatureDate>2007-06-28</signatureDate>
    </ownerSignature>
</ownershipDocument>
