<?xml version="1.0"?>
<ownershipDocument>
    <schemaVersion>X0201</schemaVersion>

    <documentType>4</documentType><periodOfReport>2003-11-07</periodOfReport>
    <issuer>
        <issuerCik>0000277948</issuerCik>
        <issuerName>CSX CORP</issuerName>
        <issuerTradingSymbol>CSX</issuerTradingSymbol></issuer><reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001237367</rptOwnerCik>
            <rptOwnerName>GRASSI ROBERT J</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>CSX WORLD TERMINALS</rptOwnerStreet1>
            <rptOwnerStreet2>2101 REXFORD ROAD, SUITE 250 WEST</rptOwnerStreet2>
            <rptOwnerCity>CHARLOTTE</rptOwnerCity>
            <rptOwnerState>NC</rptOwnerState>
            <rptOwnerZipCode>28211</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
            <reportingOwnerRelationship>
<isDirector>0</isDirector><isOfficer>1</isOfficer><isTenPercentOwner>0</isTenPercentOwner><isOther>0</isOther><officerTitle>President &amp; CEO of Subsidiary </officerTitle></reportingOwnerRelationship></reportingOwner><nonDerivativeTable><nonDerivativeHolding><securityTitle><value>Common Stock</value></securityTitle><postTransactionAmounts><sharesOwnedFollowingTransaction><value>24226.849</value></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>D</value></directOrIndirectOwnership><natureOfOwnership><value/></natureOfOwnership></ownershipNature></nonDerivativeHolding><nonDerivativeTransaction><securityTitle><value>Common stock</value></securityTitle><transactionDate><value>2003-11-07</value></transactionDate><transactionCoding><transactionFormType>5</transactionFormType><transactionCode>J</transactionCode><equitySwapInvolved>0</equitySwapInvolved><footnoteId id="F1"/></transactionCoding><transactionAmounts><transactionShares><value>3245.6601</value></transactionShares><transactionPricePerShare><value>33.80</value></transactionPricePerShare><transactionAcquiredDisposedCode><value>D</value></transactionAcquiredDisposedCode></transactionAmounts><postTransactionAmounts><sharesOwnedFollowingTransaction><value>0</value></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>I</value></directOrIndirectOwnership><natureOfOwnership><value>401(k)</value><footnoteId id="F2"/></natureOfOwnership></ownershipNature></nonDerivativeTransaction><nonDerivativeHolding><securityTitle><value>Common stock</value></securityTitle><postTransactionAmounts><sharesOwnedFollowingTransaction><value>37691.2613</value></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>I</value></directOrIndirectOwnership><natureOfOwnership><value>Executives Stock Trust</value><footnoteId id="F3"/></natureOfOwnership></ownershipNature></nonDerivativeHolding><nonDerivativeHolding><securityTitle><value>Common stock</value></securityTitle><postTransactionAmounts><sharesOwnedFollowingTransaction><value>3920</value></sharesOwnedFollowingTransaction></postTransactionAmounts><ownershipNature><directOrIndirectOwnership><value>I</value></directOrIndirectOwnership><natureOfOwnership><value>By family trust.</value></natureOfOwnership></ownershipNature></nonDerivativeHolding></nonDerivativeTable><footnotes><footnote id="F1">The reporting person disposed of shares held in his 401(k) account pursuant to a diversification election made under the Internal Revenue Code.</footnote><footnote id="F2">By Trustee of CSX Tax Savings Thrift Plan.</footnote><footnote id="F3">By Trustee, CSX Corporation Executives Stock Trust.</footnote></footnotes><remarks/><ownerSignature><signatureName>Robert J. Grassi by Rachel E. Geiersbach, Attorney in Fact</signatureName><signatureDate>2003-11-12</signatureDate></ownerSignature></ownershipDocument>

