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

    <schemaVersion>X0202</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2006-05-08</periodOfReport>

    <issuer>
        <issuerCik>0000277948</issuerCik>
        <issuerName>CSX CORP</issuerName>
        <issuerTradingSymbol>CSX</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001237373</rptOwnerCik>
            <rptOwnerName>SHEPARD DONALD J</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>CSX CORPORATION</rptOwnerStreet1>
            <rptOwnerStreet2>500 WATER STREET C160</rptOwnerStreet2>
            <rptOwnerCity>JACKSONVILLE</rptOwnerCity>
            <rptOwnerState>FL</rptOwnerState>
            <rptOwnerZipCode>32202</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
            <isOfficer>0</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
        </reportingOwnerRelationship>
    </reportingOwner>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common stock</value>
            </securityTitle>
            <transactionDate>
                <value>2006-05-08</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
                <footnoteId id="F1"/>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>528</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>70.965</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>13368</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>By trustee</value>
                    <footnoteId id="F2"/>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
        <nonDerivativeHolding>
            <securityTitle>
                <value>Common stock</value>
            </securityTitle>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>2000</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value></value>
                </natureOfOwnership>
            </ownershipNature>
        </nonDerivativeHolding>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">Exempt payment of director's fees and/or annual retainer in the form of CSX Common Stock pursuant to the CSX Corporation Stock Plan for Directors. The units are payable in cash after the reporting person ceases to be a director or otherwise pursuant to the terms of the CSX Corporation Stock Plan for Directors.</footnote>
        <footnote id="F2">By Trustee, CSX Corporation Stock Plan for Directors.</footnote>
    </footnotes>

    <remarks></remarks>

    <ownerSignature>
        <signatureName>Donald J. Shepard by Nathan D. Goldman, Attorney-in-Fact</signatureName>
        <signatureDate>2006-05-08</signatureDate>
    </ownerSignature>
</ownershipDocument>
