Skip to content
cliplimeClipLime

Convert data between CSV, JSON, XML, YAML and Excel

Paste or drop a file, pick two formats and watch the result appear. Nothing leaves this tab.

Runs on your device, nothing is uploaded

Convert from

to

Paste, type, drop a file here or load one.

0 characters, 0 lines

Options

When off, columns are called column1, column2 and so on.

A column becomes numbers only if every filled cell in it is a clean number. All types also reads true/false, and empty cells and the words null and NULL become null.

Columns such as address.city become nested objects, and tags.0, tags.1 become a list.

Write each row as

A list per row starts with the column names when they are on.

Indentation

More options

The dot in address.city.

Empty cells do not create a key.

At a glance

Formats
CSV, TSV, JSON, XML, YAML and Excel (XLSX), converted in any direction.
Input
Paste or type text, drop a file on the box, or load one. Files in UTF-8, UTF-16 or Windows-1252, such as the CSV that Excel saves under "CSV (Comma delimited)", are read correctly.
Live result
The output updates as you type. In our tests a 50,000 row CSV (4.6 MB) became JSON in about a tenth of a second. The options shown depend on the two formats you pick.
Nested data
Nested objects and lists are spread into columns such as address.city, and rebuilt from them on the way back.
Honest about changes
Notes under the result say what was assumed, flattened or left out.
Errors
A problem in your input is shown with its line and column and a plain explanation.
Privacy
Your data is converted in your browser tab and never uploaded. Free, with no sign-up.

How to do it

  1. 1

    Pick the formats

    Choose the format you have and the one you want. The options below the pickers change to match: delimiters for CSV, indentation for JSON and YAML, root and item names for XML, a sheet name for Excel.

  2. 2

    Add your data

    Paste or type it, drop a file on the input box, or press Load a file. For Excel, choose the file and then pick the sheet to convert.

  3. 3

    Check the result

    The output updates as you type. If the input has a problem, its line and column are shown. The notes under the result say what was flattened, assumed or left out.

  4. 4

    Copy or save it

    Press Copy, or Download to save a file with the right extension. The swap button between the pickers turns the result into the new input, which is handy for checking a round trip.

Tables and trees: why some conversions lose something

These formats come in two families, and moving between the families is where information can be lost.

  • Tables: CSV, TSV and Excel are rows and columns. CSV and TSV store every value as text, with no types. Excel stores numbers, true and false and dates as real values, and can hold several sheets.
  • Trees: JSON, YAML and XML can nest values inside values. JSON and YAML also have numbers, true and false, and null. XML has only text, plus attributes.

Going from a tree to a table means deciding what a row is and how to spread nested values into columns. Going from a table to a tree means deciding which text cells are numbers. This converter makes those decisions in the open, lets you change them, and lists what it did in the notes under the result.

What happens to nested data and lists

Nested objects are spread into columns named by their path. {"name": "Ana", "address": {"city": "Lisbon"}, "tags": ["a", "b"]} becomes the columns name, address.city, tags.0 and tags.1. The columns are the union of the keys of all records, so a record that lacks a key gets an empty cell.

Lists can become separate columns, one joined cell such as a;b, or JSON text in one cell. Turn flattening off to keep every nested value as JSON text.

Going back, columns with dots are rebuilt into nested objects and numbered columns into a list, so JSON to CSV and back gives you the same structure. A missing value and an empty cell look the same in a table, so they come back as null unless you choose to leave empty cells out.

If your JSON is an API response such as {"status": "ok", "data": {"items": [...]}}, the converter finds the list of records, uses it as the rows and names the keys it left out. You can also type the path yourself under More options.

XML and YAML

XML has attributes, repeated elements and exactly one root element, none of which JSON has. Attributes become keys that start with @, such as @id. Repeated elements become a list, but a single element stays a plain value, because XML cannot tell a list with one item from a value. When XML becomes a table, an element that appears once in one row and twice in another is written as a list in every row, so the columns line up. Going to XML, a list at the top becomes repeated item elements inside a root element, and you choose both names. Names that are not valid in XML, such as one with a space, are repaired with an underscore.

YAML anchors and aliases are resolved into copies and merge keys (<<) are applied, so the result has no references. Comments are dropped. Words like yes, no and on stay text, as the current YAML 1.2 specification says, and a file with several documents separated by --- becomes a list. When writing YAML, text that an older YAML 1.1 reader would take for something else, such as the country code no or the date 2001-12-14, is put in quotes.

Numbers, true and false, and empty cells

CSV has no types, so you choose how to read the text. With detection on, a column becomes numbers only when every filled cell in it is a clean number: digits with an optional minus sign and decimal point, no leading zeros and at most 15 digits. One stray word keeps the whole column as text, so a column never mixes numbers and words. A column of true and false becomes booleans the same way, and with all types detected, empty cells and the exact words null and NULL become null (a note says how many words were changed). Detection only applies when the result is JSON, YAML or Excel: CSV, TSV and XML hold nothing but text, so converting between them leaves every value exactly as written.

Values such as 007, ZIP codes with a leading zero and long IDs stay text on purpose, because turning them into numbers would change them. Numbers with thousands separators or decimal commas are not converted either, since the same text means different things in different countries. Dates are left alone for the same reason: 03/04/2024 is the 3rd of April in some countries and the 4th of March in others, so a date in a CSV stays text, also when the result is an Excel file.

Questions people ask

Is my data uploaded anywhere?

No. The text or file is read and converted in your browser tab, and the result is shown there. Nothing is sent to a server, and nothing is kept after you close the page.

How large a file can I convert?

It depends on the memory of your device. In our tests on a recent computer, a CSV with 50,000 rows (4.6 MB) became JSON in about a tenth of a second, 200,000 rows (19 MB) in under a second, and 500,000 rows (48 MB) in about two seconds, using roughly half a gigabyte of memory. Writing an Excel file is slower, about a second and a half for 50,000 rows, and reading YAML is the slowest at about two to three seconds for the same number of rows. Text boxes only show the start of very large inputs and results so the page stays responsive, but Convert, Copy and Download use all of it. Phones and older computers will manage less.

Why are some of my columns not converted to numbers?

A column becomes numbers only if every filled cell in it is a clean number. One cell such as n/a, a value with a thousands separator or a decimal comma, a leading zero or more than 15 digits keeps the whole column as text. Check the column for a stray value, or pick Keep as text to leave all cells exactly as written.

Can it convert an Excel file with several sheets?

One sheet at a time. Load the file and pick the sheet. Values come out as stored, so a formula gives its last calculated value. Formatting, colors, charts and macros are not kept, and old .xls files and files with a password cannot be read, so save them as .xlsx first.

Why do accented letters look wrong in my CSV?

Excel's plain "CSV (Comma delimited)" option saves Windows-1252 instead of UTF-8 (only its "CSV UTF-8" option writes UTF-8). The converter checks the bytes and reads the file as Windows-1252 when it is not valid UTF-8, and says so in a note. A file that is clearly UTF-8 apart from a few stray bytes is read as UTF-8, with those bytes read as Windows-1252 letters, and a note says that too. Excel in other regions can use a different legacy encoding, which cannot be guessed, so save such a file as UTF-8 first. When you write a CSV for Excel, turn on the byte order mark option under More options so Excel shows UTF-8 accents correctly.

Does it keep the order of columns and keys?

Yes. CSV, TSV, Excel, YAML and XML keep the order of the file, and so does JSON, including columns or keys named after years such as 2023, 2022 and 2021. The one exception is a JSON input larger than about 20 MB (20 million characters): above that size the browser's own JSON parser lists keys that look like whole numbers, such as 2024, before all other keys, and they come first in the result.