SITE UNDER CONSTRUCTION. Everything here is provided AS IS, WITHOUT WARRANTIES, to the extent the law allows. It is information, not professional advice. Use at your own risk. Terms and liability limits →

eThorns ES
← DeveloperES

Tool 5.2

CSV to JSON & JSON to CSV converter (RFC 4180)

Convert CSV to JSON or JSON to CSV with comma, semicolon or tab separators. Quoted cells and leading zeros are kept. The data stays in your browser.

Runs on your deviceRuns entirely in your browser: nothing you type or upload leaves your device.

How to use it

  1. Choose CSV → JSON or JSON → CSV.
  2. Paste the data, or drop a CSV or JSON file on the text box.
  3. Pick the separator (comma, semicolon or tab) and say whether the first row is a header. For JSON output, pick the indentation or Minify.
  4. Press Convert, then copy the result or download it as `data.json` or `data.csv`.

Excel exports semicolons, APIs want JSON

Accounting systems, online stores and Excel export tables as CSV: plain text, one row per line, with the columns split by a separator. Web APIs, webhooks and most configuration files expect JSON instead. CSV → JSON turns each row into an object, using the header row as keys; JSON → CSV takes a list of objects (or a list of lists) and writes one row per item.

In Colombia and most of Latin America the comma is the decimal mark, so a CSV saved by Excel usually separates columns with ;. Convert it with the comma setting and each line lands in a single column, or gets cut at every decimal comma. Pick the separator the file really uses: the first line of the file, opened in a text editor, shows it.

Example: a product list from tienda-ejemplo.co

An export from tienda-ejemplo.co has three lines: sku;nombre;notas, then 0101;Café especial;"Tueste ""medio"", grano", then 0102;Panela orgánica;Molida. The note is in quotes because it contains a comma, and the quotes inside it are doubled. That is how RFC 4180, the CSV standard, writes such a cell.

With Semicolon selected and First row is header ticked, CSV → JSON gives [{"sku": "0101", "nombre": "Café especial", "notas": "Tueste \"medio\", grano"}, {"sku": "0102", "nombre": "Panela orgánica", "notas": "Molida"}], indented with 2 spaces unless you choose otherwise. The SKU stays "0101", as text with its leading zero, and the comma inside the note doesn't split the column. In JSON the inner quotes are written \".

Numbers, uneven rows and broken quotes

Auto-detect numbers and booleans is off by default, so every cell comes out as text. Turn it on and 1200 becomes the number 1200, true and false become booleans and null becomes null. Some values stay text on purpose: codes with a leading zero like 05001 (the DANE code for Medellín), numbers longer than 15 characters (they could be rounded), and amounts with a decimal comma like 12,50. A NIT like 800197268 would become a number, so leave the option off when a column holds IDs.

With a header row, a short row gets empty text in the missing columns, and values past the last header are dropped: check that the header covers every column. An empty header cell becomes col_1, col_2 and so on, by position. A quote that opens a cell and never closes stops the conversion with an error, instead of swallowing the rest of the file into one cell.

FAQ

Why does my Excel file use semicolons instead of commas?

Excel takes the list separator from the computer's regional settings. Where the comma is the decimal mark (`12,50`), as in Colombia, that separator is usually `;`, so numbers and columns don't get mixed up.

Why do accents and ñ show up as � after I drop the file?

The tool reads files as UTF-8, and the file was probably saved in Excel's older encoding (Windows-1252, often labelled ANSI). In Excel, save it again as CSV UTF-8 (comma delimited), or open it in a text editor and save it as UTF-8, then drop it again.

How are line breaks and quotes inside a cell handled?

As RFC 4180 says: a cell that contains the separator, a quote or a line break is wrapped in double quotes, and each quote inside it is doubled (`""`). The tool reads cells written that way, and writes them that way in JSON → CSV.

Can I convert JSON back into CSV?

Yes. Choose JSON → CSV and paste a list of objects, a list of lists or a single object. The header row lists every key found in any object, in the order it first appears; untick Include header row to leave it out. A nested object or list goes into its cell as JSON text, `null` becomes an empty cell, and lines end in CRLF, as RFC 4180 specifies.

What happens if my CSV rows have different numbers of columns?

With the header option on, a short row gets empty text in the missing columns and values past the last header are dropped. With it off, each row comes out as a list with exactly the values it has, so nothing is lost.

  • 5.1JSON formatterFormat or minify JSON and find syntax errors by line and column.
  • 5.3YAML to JSON converterConvert YAML to JSON and back in your browser.
  • 5.4Base64Encode or decode Base64 in your browser: UTF-8 text, URL-safe Base64, files to Base64 or data URLs, and Base64 back to a downloadable file.
  • 5.5Color contrast checkerCheck the contrast ratio of a text color on its background against WCAG 2.2 AA and AAA, for normal text, large text and UI components.
  • 5.6Cron explainerRead a 5-field cron expression as a plain sentence and see its next 5 run times in your time zone.
  • 5.7Number base converterConvert whole numbers between decimal, hexadecimal, binary and octal, with bit length and grouped digits.
  • 5.8HTML entity encoderEncode text as HTML entities (named, decimal or hex) or decode entities back to text: <, >, &, quotes, Spanish accents, Latin-1 symbols.
  • 5.9URL encodePercent-encode or decode URLs and query values, and break any URL into protocol, host, path, query parameters and fragment.
  • 5.10SHA-256 hashGet SHA-1, SHA-256, SHA-384 and SHA-512 hashes of text or files and verify a download against its published checksum.
  • 5.11UUID generatorGenerate random UUID v4 or time-ordered UUID v7 (RFC 9562) in your browser, 1 to 1000 at a time, in uppercase or without dashes.
  • 5.12Unix timestampConvert Unix timestamps in seconds or milliseconds to ISO 8601, UTC and your local time, or a date back to epoch.
  • 5.13JWT decoderDecode a JSON Web Token in your browser: see the header and payload as formatted JSON and whether it has expired.
  • 5.14Regex testerTest regular expressions live: highlighted matches, capture and named groups, flags and clear errors.

╌╌ END ╌╌