Tools
Guides

CSV Toolkit

Format

Parse, align and preview CSV/TSV with custom delimiters and quotes, or convert between CSV and JSON. Sort and deduplicate columns — powered by papaparse.

100% client-side No backend

Remote URLs are not fetched; paste your JSON directly.

Input
Output
Paste CSV on the left, then pick a mode.

Europe commonly uses ; as the CSV delimiter.

On this page

What is a CSV toolkit?#

CSV is the lowest-common-denominator format for tabular data — every spreadsheet, every database import wizard, and every analytics tool can read it, and almost none of them agree on the details. Is the delimiter a comma or a semicolon? Does the first row hold headers? Are values quoted with " or '? A file that opens perfectly in one tool can arrive garbled in another, simply because the defaults differ. A CSV toolkit exists to make those choices explicit and to reshape a file so it does what you need.

This page does four jobs, all driven by papaparse. Align parses the file and pads each cell to its column’s width, producing a monospace, column-aligned grid you can paste straight into a code review, a README, or a bug report — the kind of layout that makes a misaligned row jump out instantly. Preview parses and renders the table in the page itself, so you can eyeball the data before doing anything with it. CSV → JSON turns rows into a JSON array (of objects when there is a header, of arrays otherwise). JSON → CSV goes the other way, taking a JSON array and emitting CSV. On top of all of that, you can sort by any column, deduplicate full rows, switch the delimiter (comma, semicolon, tab, or a custom single character), and choose the quote character — the exact knobs that decide whether the file survives the next tool in your pipeline.

How to use it#

  1. Paste your CSV (or JSON, in JSON → CSV mode) into the Input pane on the left. The placeholder shows the expected shape; Sample loads a small dataset.
  2. Pick a Mode button: Align, Preview, or JSON. When JSON is selected, a second button group appears for the direction — CSV → JSON or JSON → CSV.
  3. Set the structural options on the toolbar:
    • Delimiter — comma, semicolon, tab, or custom (a one-character field appears for the custom value, defaulting to |).
    • Quote — double (") or single (').
    • First row is header — tick when row 1 holds column names; untick for headerless data. Header mode drives both parsing and JSON output shape.
  4. Optionally tidy the data: pick a Sort column (populated from your header, or a numeric index for headerless input), choose ascending or descending Order, and tick Dedup to drop fully duplicate rows.
  5. Read the result in the Output pane (or the preview grid in Preview mode). The header shows output size and row count; use Copy to take it. Clear resets both panes.

If a row has the wrong number of fields, or the input is malformed, the status bar reports the row number so you can fix the source rather than guessing.

Key features#

  • Column-aligned output. Align mode pads every cell to its column’s longest value, so a CSV that looked like a wall of commas suddenly lines up — invaluable for spotting a row that is short a field.
  • Both directions to JSON. CSV → JSON produces an array of objects (with headers) or an array of arrays (headerless). JSON → JSON accepts either shape back.
  • Delimiter-aware. Switch between comma, semicolon (common in European locales where the comma is the decimal separator), tab (TSV), or a custom character. The hint below the toolbar reminds you why semicolons exist.
  • Sort and deduplicate. Sort numerically when both values look like numbers, otherwise lexicographically. Dedup removes exact full-row repeats (header row always kept).
  • Safe preview. The preview grid is built with safe DOM APIs — only textContent, never innerHTML of your data — so even a CSV full of <script> tags renders as inert text.
  • Strictly client-side, with a Web Worker for inputs over 1 MB.

Worked example#

A small roster pasted in with a duplicate row and a header:

Input:

name,role,city
Ada,Engineer,London
Lin,Designer,Taipei
Ada,Engineer,London
Sam,Manager,Berlin

The third row repeats Ada exactly. Click Align with Comma delimiter, header on, then tick Dedup:

name role     city
Ada  Engineer London
Lin  Designer Taipei
Sam  Manager  Berlin

Each column padded to its widest value, so the three rows line up and the duplicate Ada is gone — the status bar reports one row removed. Now switch the mode to JSON (CSV → JSON) with the same options:

[
  { "name": "Ada", "role": "Engineer", "city": "London" },
  { "name": "Lin", "role": "Designer", "city": "Taipei" },
  { "name": "Sam", "role": "Manager", "city": "Berlin" }
]

The header row became object keys; each remaining data row became an object. Sorting by role would reorder the rows lexicographically; sorting by a numeric column would sort by value.

FAQ#

When should I use semicolon instead of comma?#

When the data contains commas as part of the values and you are in a locale (much of Europe, Latin America) where the comma is the decimal separator — 3,14 is a single number there, not two fields. Excel in those locales exports CSV with semicolons by default. If a file opens with everything jammed into column A, the delimiter is almost certainly wrong; switch to semicolon and re-align.

What does Dedup actually compare?#

It compares entire rows for exact equality, after the header has been separated out. Two rows are duplicates only if every field matches, cell for cell. The header row is never considered a duplicate and is always kept. Partial matches (same name, different city) do not count as duplicates.

How does CSV → JSON decide between objects and arrays?#

If First row is header is ticked, each data row becomes an object whose keys are the header names. If it is unticked, each row becomes an array of strings, labelled Col 1, Col 2 and so on only in the preview — the JSON output is a plain array of arrays. Tick the header option when row 1 really is column names; untick it for raw numeric grids.

Is my data uploaded anywhere?#

No. Parsing and unparsing both run in your browser through papaparse, bundled with the page. Files over 1 MB are handled in a Web Worker so the UI stays responsive, but the data never leaves your device.