About this tool
Convert CSV into JSON, HTML, XML, SQL inserts, or Python dictionaries.
The CSV Converter rewrites pasted CSV as JSON, an HTML table, XML, SQL INSERT statements or a Python list of dicts. Parsing is a hand-written RFC 4180 character scanner rather than a split on the delimiter: it tracks quote state character by character, so a comma, a CRLF line break or a doubled "" quote inside a quoted field is read the way Excel wrote it instead of tearing the row apart. Conversion runs in a React useMemo in your browser and re-runs as you type — there is no upload step, no server call and no file leaving your device. Each target then applies its own escaping: HTML entities, XML character data, ANSI doubled single quotes for SQL, and backslash escapes for Python string literals.
Open CSV Converter on AltFTool — it loads instantly in your browser.
Paste your CSV into the input box — or copy the cells out of Excel or Google Sheets and set the delimiter to Tab.
Choose an output format (JSON, HTML table, XML, SQL INSERT or Python dicts) and match the delimiter, header-row and type-detection settings to your data.
Check the parsed preview of the first five rows, then press Copy output to take the converted result.
Quoted commas, embedded CRLF line breaks and doubled quotes are resolved by a character-level scanner, so real spreadsheet exports survive the conversion intact.
JSON, HTML table, XML, SQL INSERT and Python dicts regenerate instantly when you switch format — the CSV stays in the box, nothing is re-pasted.
HTML entities, XML character data, ANSI single-quote doubling in SQL and \n / \" escapes inside Python literals are each applied by the writer for that format.
There is no file picker and no server round-trip: parsing and conversion happen on your device. Free, no signup, up to 20,000 records or about 4 MB of pasted text at a time.
Yes — free, with no account and no trial limit. The only cap is a safety limit of 20,000 records or roughly 4 MB of pasted text per conversion, which exists so a huge paste can't lock up the browser tab.
Paste only — there is no file picker. Open the .csv in a text editor and paste the contents, or copy the cells straight out of Excel or Google Sheets and switch the delimiter to Tab, since spreadsheet clipboards are tab-separated. The result comes back through the Copy output button; there is no download step.
Paste the CSV and leave the format on JSON. You get a pretty-printed array of objects, indented two spaces, one object per data row keyed by your header names. With type detection on, 42 becomes a number, true/yes and false/no become booleans, and an empty cell becomes null.
Wrap the whole field in double quotes: "Sharma, Priya" is one field, not two. RFC 4180 also allows a line break inside a quoted field, and a literal double quote is written twice — "Lee ""Jay"" Min" parses as Lee "Jay" Min. All three rules are implemented here.
Yes — pick comma, semicolon, tab or pipe from the delimiter list. Semicolon files are what Excel writes in locales that use a comma as the decimal separator, such as Germany and France, so a European export that looks mangled usually just needs the semicolon setting.
They escape single quotes by doubling them, which is the ANSI SQL rule, and an empty cell becomes NULL rather than an empty string. Review them before running against a live database: the table name comes from the field you type, column names are derived from your header row and lower-cased to snake_case, and types are inferred from the data rather than read from your schema.
Leading zeros are safe — the number pattern rejects them, so 01234 stays the string "01234". A plain digit string with no leading zero, such as a 10-digit phone number, does become a number, so untick "Detect numbers, booleans and blanks" when every cell must stay text.
Short rows are padded with empty values so every record has the same width, and the count is reported as "Rows with a different column count" so you can spot a broken export. Duplicate header names are de-duplicated (name, name_2), and a blank header becomes column_1, column_2 and so on.
Add the CSV Converter widget to your blog or website — free, responsive, no signup. Just keep the “Widget by AltFTool” credit link visible.
<iframe src="https://www.altftool.com/embed/widget/csv-converter"
title="CSV Converter — free AltFTool widget"
width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden"
loading="lazy" referrerpolicy="no-referrer-when-downgrade" allow="clipboard-write"></iframe>
<p style="font-size:12px;margin:4px 0 0">Widget by <a href="https://www.altftool.com/tools/all/csv-converter?utm_source=embed&utm_medium=widget" rel="nofollow">AltFTool — free online tools</a></p>