Skip to content

Online CSV editor

Open a CSV file or paste CSV text, fix the cells in a grid, then save it as CSV, Excel, JSON or a Markdown table. The file stays on your device.

Your files stay on this device. Nothing is uploaded.

No file at hand?

RowColumnSort
0 rowsSaved in this browser
Files up to 50 MB open. Tested with 50,000 rows by 20 columns. Need Excel files or several sheets? Use the table editor.

    Tools work on the selected cells or the selected column. Ctrl Z undoes them.

    Advertisement

    Last checked by the TextEditor.com team

    How to use the CSV editor

    Drop a CSV file on the page, or click the box and pick one. You can also paste CSV text, or start with an empty table. The grid works like a small spreadsheet: click a cell and type, press Enter to change what is in it, Tab moves right. Your table saves in this browser as you work. Nothing is sent to our server.

    1. OpenDrop the file, paste the text, or copy cells in Excel and press Ctrl+V in the grid.
    2. FixSort, find and replace, remove duplicate rows, trim spaces. Click a column letter to see its count, sum and range.
    3. ExportPick CSV, TSV, JSON, Excel, Markdown, HTML or SQL. Copy the result or download a file.

    Only the rows on the screen are drawn. A file with 50,000 rows and 20 columns opens in about a second and scrolls like a small one.

    What a CSV file is

    CSV stands for Comma Separated Values. The file is plain text. Each line is one row, and commas split the cells. The first line usually holds the column names. You can open a CSV file in Notepad and read it. That is why nearly every program that works with data can read and write it.

    The same three rows as a CSV file and as a table
    name,city,joined
    Anna Smith,Oslo,2024-01-05
    "Lee, Sam",Austin,2023-11-30
    namecityjoined
    Anna SmithOslo2024-01-05
    Lee, SamAustin2023-11-30
    The second name has a comma in it, so it goes inside quotes.

    There is no real standard. RFC 4180 from 2005 wrote down the common rules, but it is an informational memo, not a rule that programs must follow. The biggest difference between programs is the separator. Excel uses the list separator of your Windows region. Where the decimal sign is a comma, as in Germany, France or Hungary, that separator is a semicolon. A file saved in Berlin can open in one column in New York.

    The quoting rules

    A cell can hold a comma, a quote or even a line break. Then the whole cell goes inside double quotes. A quote inside such a cell is written twice. Spaces at the start or end of a cell are kept only inside quotes, so quotes help there too. Type any value below and see how this editor writes it.

    Type a value and see it as a CSV cell
    With commas:     "She said ""hi"", then left"
    With semicolons: "She said ""hi"", then left"
    With tabs:       "She said ""hi"", then left"

    The value has a quote, so it goes in quotes and each quote inside is written twice. The comma would split the cell in the comma version, so quotes are needed there anyway.

    When a program skips one of these rules, the file breaks. A quote without its pair pulls every row after it into one giant cell. If a file looks wrong after opening, look at the first row that went wrong.

    Why Excel breaks CSV files

    Excel does not open a CSV file as text. It guesses what each cell is and changes it. When you press Save, the changed values go back into the file. These are the common cases:

    What the file hasWhat Excel showsHow to keep it
    00420, a postal code or a phone number420Open through Data, From Text, and set the column to Text
    MARCH1, SEPT2, 1-2 (gene names, sizes)1 March, 2 September, 2 JanuarySame. In 2020 the human gene naming committee renamed 27 genes because of this.
    4111111111111111, a card or account number4.11111E+15, and the digits after the 15th turn into zerosText column. Excel keeps 15 digits of a number.
    2024-01-051/5/2024 or 05.01.2024, in your region's formatText column, or accept the new format
    é, ő, 日本 in a UTF-8 fileé, Å‘ or question marksSave the file with a byte order mark (BOM). Excel then reads it as UTF-8.

    The byte order mark is three hidden bytes at the start of the file. Excel sees them and reads the file as UTF-8. Most other programs ignore them, but some scripts choke on them and show a strange first column name. The Export panel has a switch for it. Turn it on for Excel, off for everything else.

    CSV, TSV or JSON?

    FormatCells split byGood forWatch out
    CSVComma or semicolonExcel, databases, nearly every programQuoting, the regional separator, text encoding
    TSVTabPasting into a spreadsheet. Cells rarely hold tabs.Many programs do not quote at all, so a line break inside a cell breaks the row
    JSONKeys and values, no rowsWeb apps, scripts, settings filesBigger file. Numbers and text are different types, so 00420 must be a string.

    Copy from the grid gives tab separated text, and Excel and Google Sheets paste it as cells. The JSON export gives an array of objects with the header names as keys, ready for a script or for the JSON editor.

    How to open a CSV file without Excel

    Any text editor opens a CSV file, but a grid is easier to read. Drop the file here. The separator and the text encoding are found by themselves, and you can change both in the bar above the grid. The Wikipedia page on CSV lists more programs and the history of the format.

    Need Excel or OpenDocument files, or a workbook with several sheets? Use the table editor. Need a table for GitHub or a README file? Export as Markdown here, or build it in the Markdown table generator.

    Keyboard shortcuts

    KeysWhat they do
    Arrow keys, TabMove to the next cell. Hold Shift to select more cells.
    Type, Enter or F2Typing replaces the cell. Enter and F2 change what is in it.
    Alt + EnterA line break inside a cell
    DeleteClear the selected cells
    Ctrl + C, VCopy and paste cells, also to and from Excel and Google Sheets
    Ctrl + Z, YUndo and redo
    Ctrl + FFind and replace
    Ctrl + KEvery tool in one list. Type to find one.
    Ctrl + S, OSave the file, or open one

    On a Mac, use Cmd in place of Ctrl. On a phone, tap a cell and change it in the box above the grid.

    Other tools for tables and lists

    Frequently asked questions

    Is my CSV file uploaded anywhere?

    No. Your browser reads the file on your device, and the table is saved in this browser so it is still here next time. Nothing reaches our server.

    How do I open a CSV file in Excel with the right columns?

    Export it with the separator your Excel expects: semicolons where the decimal sign is a comma, commas elsewhere. Or keep the file and use Data, From Text in Excel, where you pick the separator and can set columns to Text.

    How do I change the separator of a CSV file?

    Open the file here, open Export and pick CSV with a comma, semicolon or pipe, or Tab separated. Then download it. Quotes are added where a cell needs them.

    How do I convert CSV to JSON?

    Open the file, click Export and pick JSON. You get an array of objects with the header names as keys, or an array of arrays. Numbers come out as numbers unless you turn that off.

    How do I convert CSV to Excel?

    Click Export, pick Excel workbook (.xlsx) and download. Numbers are saved as numbers, except codes with a leading zero, which stay text so the zero is kept.

    How big a file can I open?

    Files up to 50 MB. The grid draws only the rows on the screen, so 50,000 rows scroll smoothly. Very big tables are not saved in the browser between visits, so download your work first.

    Can I sort a quick list without opening a grid?

    Yes. Paste it into sort lines. It sorts by any column, removes duplicate lines and keeps the header on top. To drop rows that repeat one column, such as an email address, use remove duplicate lines.

    • Text editorWrite and edit plain text in your browser.
    • Sort linesSort lines A to Z, by number or by length.
    • Word counterCount words, sentences and paragraphs as you type.
    • Code editorWrite or paste HTML, CSS, JavaScript, JSON, Python, SQL and more with colors, line numbers and a format button.
    • Text comparePaste two texts and see every changed line and word highlighted side by side.
    • Find and replaceFind and replace words in any text, with match case, whole words and regex.

    ↑ ↓ to choose, Enter to open, Esc to close