CSV to Financial JSON Converter
Convert pasted CSV tables into JSON records while preserving quoted text, source headers, and values that cannot be safely parsed as numbers.
How it works
Paste a table with a header row and data rows. The parser checks the supported separators and handles quoted separators, escaped quotation marks, and line breaks inside quoted cells.
The converter maps only exact normalized aliases for date, symbol, type, quantity, price, and amount. Other headers remain unchanged. Repeated aliases that would map to one field stay under their original headers and produce a warning.
Date, symbol, type, and other text remain strings. Quantity, price, and amount values become numbers only when every populated value in that column is a finite, safe plain decimal. Otherwise the column stays text and the converter explains why.
Review the column summary, warnings, and JSON before using the result. This tool does not reconcile trades, validate a broker export, convert currencies, or interpret investment and tax rules.
Step by step
- Paste a CSV table with a header and data row
- Review the column mapping and any warnings
- Check and copy the JSON records
Worked example
The displayed input has a symbol with a leading zero and a notes field with a comma, doubled quotation marks, and a line break. The unit test parses this same input.
The result keeps symbol as 00123, converts quantity to 2 and price to 12.5, and preserves the note exactly as shown, including its English text, punctuation, and line break. The converter does not translate cell contents.
When to use this converter
Use this converter when another program needs JSON records from a pasted CSV table. It is intended for basic format conversion, not transaction analysis.
Before using the output, compare the column summary and row count with the source table and check the destination system's schema.
Common mistakes
Do not treat a mapped field name as verification of the source data. For example, a value mapped to price is copied from the matching source column; it is not checked against market prices.
Do not import the JSON until you have checked row counts, unmapped headers, warnings, units, and the receiving system's required schema. Currency symbols and locale decimal separators are kept as text rather than interpreted.
Parsing rules and assumptions
Parse records with CSV quoting rules
Select a supported delimiter from comma, semicolon, tab, or pipe
Map exact normalized header aliases
Convert a quantity, price, or amount column only when all nonblank values are safe plain decimals
Serialize records as JSON
Text fields and unknown columns are kept as text. If a recognized numeric column contains a malformed, currency formatted, or unsafe precision value, populated values in that whole column stay as strings and a warning is shown. Empty cells remain empty strings and do not affect numeric conversion. No currency or date locale is inferred.
Limitations and assumptions
The parser accepts up to 1,000,000 characters and 10,000 records, and supports comma, semicolon, tab, and pipe separators with quoted fields. It does not cover every CSV dialect or broker export. It requires one header row, unique normalized headers, and the same number of fields in every record. Only exact header aliases are mapped. Dates and text stay unchanged; numeric conversion accepts plain decimal values only and preserves uncertain values as text. The converter does not infer currency, validate market data, reconcile transactions, or determine tax treatment. The pasted CSV is stored in browser storage on this device.
Key terms
- Delimiter
- A comma, semicolon, tab, or pipe that separates fields outside a quoted cell.
- Mapped header
- A header that exactly matches a known alias after case, spacing, and punctuation normalization.
- Safe numeric value
- A nonblank value accepted as a finite plain decimal with safe numeric precision.
Related questions
A CSV parser solves a format conversion task: it turns rows and columns into JSON records while keeping source text available. It does not reconcile trades or calculate investment performance.
Use this converter when you need JSON for a script or data review. Confirm the receiving system's field names and value types before importing the output.
FAQ
How does delimiter detection work?
The converter evaluates comma, semicolon, tab, and pipe separators while respecting quoted fields. A separator inside a quoted cell does not split the cell. When multiple separators produce equally plausible tables, the converter reports ambiguity instead of choosing one silently.
How are quotes and line breaks handled?
Quoted fields may contain separators, line breaks, and quotation marks escaped by doubling them. Records must have the same number of fields. An unmatched or misplaced quote and a row with a different field count produce an error with a line number.
Which headers map to standard fields?
Exact normalized header aliases map Date, Trade Date, Settlement Date, DateTime, or Time to date; Symbol, Ticker, Instrument, or Security to symbol; Type, Action, Transaction Type, or Side to type; Quantity, Qty, Shares, or Units to quantity; Price, Unit Price, Share Price, or Rate to price; and Amount, Total, Value, Proceeds, or Net Amount to amount. Other headers remain under their source names. Matching is exact, so Corporate Action is not treated as a price column.
Will every broker export parse correctly?
No. This is a general parser for comma, semicolon, tab, or pipe separated tables with quoted fields. It accepts at most 1,000,000 characters and 10,000 records. It does not recognize every broker layout, verify a broker's schema, reconcile transactions, or apply account rules. Check the source and output before using the JSON elsewhere.
Where is my pasted CSV stored?
CSV parsing runs in the browser, and the pasted text is saved in this device's browser storage. This page's parser does not send the CSV content to the application server. Clear the field on a shared device when you are done.
Related tools
This tool converts a table format. A portfolio performance calculator or tax lot tool answers a different question and may require data that this parser does not calculate.