# CSV to JSON > A free browser tool that converts CSV to JSON and JSON back to CSV. Drop or paste a file; the delimiter > and encoding are found, problems are named by line, and the result downloads as JSON, JSON Lines or CSV. > The file is never uploaded. URL: https://csv-to-json.skillsafe.ai/ API: https://csv-to-json.skillsafe.ai/api.html ## What runs free, in the browser - Encoding from the bytes (UTF-8, UTF-8 with BOM, UTF-16, Windows-1252 fallback). Delimiter: comma, semicolon, tab or pipe, whichever gives the same field count on the most lines (or chosen by hand). - RFC 4180 reading: quoted fields with delimiters, "" escapes and line breaks. Rows with too few or too many fields, repeated or empty headers and unclosed quotes are reported with line numbers; nothing is dropped (missing fields empty, extra fields in extra_1, extra_2...). - Types per column, only when every value fits: whole numbers, numbers, true/false. Codes with leading zeros (02139), integers beyond 2^53 and decimal commas stay text. "All text" keeps every value as written. - Output: array of objects, JSON Lines or arrays (header row first); 2/4 spaces or one line; empty cells as empty text, null or left out; dotted headers nested on request; a JSON Schema (draft 2020-12). - JSON to CSV: a list of objects, JSON Lines, a list inside one top-level key, or an object of objects. Nested objects become dotted columns; lists go into their cell as JSON text. Comma, semicolon or tab; optional UTF-8 BOM and an Excel-safe mode that prefixes cells starting with = + - @. ## Optional AI step (metered, after sign-in) Task `plan_columns`. Input fields (all strings): `task`, `file`, `direction` (csv_to_json | json_to_csv), `headers` (JSON text), `sample` (JSON text: up to 15 whole rows {line, cells}), `profile` (JSON text: per column values, empty, distinct, fits, leading_zeros, too_long_integers, sample), `facts` (JSON text). Reply: {"task":"plan_columns","record_name":"...","columns":[{"column","key","type","note"}]} with type string | integer | number | boolean | date. The page tidies keys to snake_case and makes them unique, then checks every value in the file: a column with any value that does not fit its type stays text, with the lines named. Only the headers, sample rows and the profile are sent - never the whole file. ## Source Adapted from the agent skill @wshobson/file-conversion (wshobson/agents, MIT), whose CSV/JSON route is: inspect encoding, delimiter, headers, nesting and types; define the schema; never silently flatten or coerce: https://skillsafe.ai/skill/@wshobson/file-conversion