# CSV, JSON, XML & Excel Converter

Convert between CSV, TSV, JSON, JSON Lines, XML and Excel (.xlsx) by pasting or opening a file. Values stay as text by default, so zero-padded postal codes, phone numbers and long IDs are never changed. Everything runs in your browser; your data is not uploaded.

- URL: https://tools.itlibra.com/en/data-converter
- On-device・No upload
- Last updated: 2026-11-27

## How to use

1. Paste CSV, TSV, JSON, JSON Lines or XML into the input, or drop / choose a file (.csv .tsv .json .jsonl .xml .xlsx). The format is detected from the content and can be overridden.
2. Pick the target under “Convert to”: CSV, TSV, JSON, JSON Lines, XML or Excel. The encoding of Shift\_JIS CSV files is detected automatically, and for Excel workbooks you can choose the sheet.
3. “Value types” defaults to “Keep as text”. Turn on inference only if you want numbers, booleans and null, and list columns such as postal codes under “Columns to keep as text”.
4. Set how arrays are expanded when flattening nested JSON (a\[0\] or a JSON string), whether to rebuild nesting when turning a table into JSON, the XML root and row element names, and the CSV encoding (UTF-8, with BOM, Shift\_JIS) and line endings (CRLF/LF).
5. Check the result in the Table and Text views, review the row and column counts and warnings (ragged rows, duplicate keys, lost information), then copy or download it.

## Use cases

- Expand a nested JSON API response into a CSV or .xlsx you can open in Excel
- Convert a Shift\_JIS CSV to UTF-8, or a UTF-8 CSV to a form Excel opens without mojibake (BOM or Shift\_JIS)
- Turn a CSV into JSON or Excel without losing leading zeros in postal codes, phone numbers or product codes
- Inspect XML data (orders, product feeds, config) as a table, or build XML from a table
- Move between CSV and JSON Lines (one JSON record per line) for logs and data pipelines
- Edit a table as JSON and rebuild the original nesting (a.b, a\[0\])

## What it does

### Defaults that never break leading zeros or long IDs

Values from CSV, Excel and XML are written as text by default. A postal code like 0123456 or a phone number like 03-1234-5678 stays exactly as it is, and Excel output uses text cells. Even with number inference on, numbers with a leading 0 and numbers of 16+ digits stay text, and you can exclude specific columns.

### Reads and writes Shift\_JIS

The encoding of a CSV (UTF-8, Shift\_JIS, EUC-JP, UTF-16) is detected from its bytes, with a preview of the file start so you can spot mojibake. Output can be UTF-8, UTF-8 with BOM (for Excel) or Shift\_JIS, and characters Shift\_JIS cannot hold (such as emoji) are reported.

### Nested JSON and tables, both ways

Nested JSON flattens to dot-notation columns such as user.name and tags\[0\]; turning a table back into JSON can rebuild the nesting from the same notation. Arrays can be split into columns or kept as a JSON string in one cell, and round trips are verified by automated tests.

### Explicit XML rules

Attributes become “@name”, text becomes “#text”, and repeated sibling elements become an array. XML output lets you set the root and row element names, fixes invalid names by a documented rule (and lists the changes), and always escapes special characters. The reader never expands external or DOCTYPE entities and reports errors with line and column.

### Check before you save

See the converted table and text side by side, with row and column counts and warnings for ragged rows, duplicate keys, information lost by flattening and characters Shift\_JIS cannot hold. Large inputs run in a Web Worker with progress and a Cancel button.

### Entirely in your browser

Your data and files are processed only inside this browser. Nothing is uploaded or stored, and no external conversion service is used. Once loaded, it also works without a connection.


## Supported formats

### Input

- CSV
- TSV
- JSON (nested, arrays)
- JSON Lines (.jsonl / .ndjson)
- XML
- Excel (.xlsx / .xlsm, multiple sheets)
- UTF-8 / Shift\_JIS / EUC-JP / UTF-16 (auto-detected)

### Output

- CSV (UTF-8, with BOM, Shift\_JIS; CRLF / LF)
- TSV
- JSON (array of objects or arrays; pretty or minified)
- JSON Lines
- XML
- Excel (.xlsx)


## Capability matrix

| Feature | Support | Notes |
| --- | --- | --- |
| Convert between CSV / TSV / JSON / JSON Lines / XML / xlsx | Supported | — |
| Format auto-detection (by content, overridable) | Supported | — |
| Encoding detection and Shift\_JIS output | Supported | Characters Shift\_JIS cannot hold are reported |
| Protect leading zeros and long IDs (text by default) | Supported | Type inference is opt-in |
| Flatten nested JSON (a.b / a\[0\]) and rebuild it | Supported | Not always exact, e.g. when a key exists in only some rows |
| XML attributes (@attr), text (#text) and repeated-element arrays | Supported | — |
| XML output with root / row names and name fixing | Supported | — |
| Read multi-sheet xlsx | Supported | Output is a single sheet |
| xlsx formatting, formulas, charts, images, macros | Not supported | Formulas become their values; formatting and charts are not carried over |
| Legacy .xls and password-protected files | Not supported | Save as .xlsx first |
| Formula-injection guard for CSV / TSV (neutralise values starting with = + - @) | Supported | Optional (off by default). The number of affected values is always reported |
| XSLT, schema validation, external entities in XML | Not supported | External entities and DTDs are never loaded for safety |
| Keep the order of XML mixed content (elements inside text) | Partial | Text is gathered under #text. Empty arrays \[\] are not written to XML |
| Auto-repair of JSON with comments or trailing commas | Not supported | Use the JSON formatter and validator for that |
| Offline use | Supported | Works without a connection once loaded |

## Limits & notes

- Input is limited to 50 MB, and tables to 5 million cells. Split larger data.
- xlsx files whose unpacked size exceeds 300 MB (or that hold more than 10,000 entries) are rejected.
- Reading xlsx is limited to 3 million cells; writing follows Excel’s limits (1,048,576 rows, 16,384 columns). Cells longer than 32,767 characters are truncated.
- Flattening creates at most 10,000 columns. For deeply nested data or long arrays choose “One cell as a JSON string” or set “Rows location”.
- Nesting depth is limited to 1,000 levels for JSON and XML. Rebuilding with array indexes (a\[0\]) supports indexes up to 10,000.
- The text view shows the first \~60,000 characters. Copy works up to 2 million characters; use Download beyond that.
- Number inference covers up to 15 significant digits. Numbers with a leading 0 and numbers of 16+ digits always stay text.
- Excel drops leading zeros when it opens a CSV directly. Export as .xlsx to keep them.
- Works on phones too, but for large files or tables with many columns a computer is recommended.

## Privacy & safety

Pasted data and opened files are processed only inside your browser. Nothing is uploaded or stored, and no external service is used, so customer lists and data containing API keys are safe to convert. Closing the page discards everything.

## FAQ

### Excel removes the leading zeros of postal codes and phone numbers when I open a CSV. What can I do?

When Excel opens a CSV it treats anything that looks like a number as a number and drops the leading zeros. The CSV itself is not damaged. Convert it to Excel (.xlsx) here and the values are saved as text cells, so the zeros stay. For other targets such as JSON, every value is also written as text by default.

### My Shift\_JIS CSV shows garbled text. Can this fix it?

When you open a file, the encoding (Shift\_JIS, UTF-8, EUC-JP …) is detected and the start of the file is shown. If it is wrong, choose the right one under “Encoding”. For output you can pick UTF-8 with BOM or Shift\_JIS, both of which open correctly in Excel on Windows.

### What happens when I convert nested JSON to CSV? Can I get it back?

Objects are joined with dots (user.name) and arrays are split into columns (tags\[0\], tags\[1\]); arrays can also be kept as a JSON string in one cell. When converting the CSV back to JSON, turn on “Rebuild nesting from a.b / a\[0\] column names” and type inference to restore the original structure. A CSV cannot tell an empty string from null or from a missing key, so you choose how empty cells are treated.

### How is XML converted to JSON or CSV?

Attributes become “@name” keys, element text becomes a string, and text next to attributes or children becomes “#text”. Repeated elements with the same name become an array (a single element does not). For CSV, repeated elements become rows and attributes and child elements become columns such as @id and address.city.

### Can it handle large files, and are they uploaded?

It converts up to 50 MB and 5 million cells. Processing runs in a Web Worker so the page stays responsive, with progress and a Cancel button. Files are never sent anywhere.

### Numbers and true/false are written as strings. Why?

That is the safe default. Set “Value types” to “Infer numbers, booleans and null” to turn 12 into a number and true into a boolean. Numbers with a leading 0 and 16+ digits stay text, and you can list further columns under “Columns to keep as text”.
