Compatible with IntelliJ IDEA and other JetBrains IDEs based on IntelliJ Platform 2024.2 and newer.
This plugin adds support for CSV (Comma-Separated Values) and related file types to JetBrains IDEs. It provides a text editor and a table editor with syntax validation, highlighting, formatting, inspections, and other familiar IDE features.
- CSV, TSV, and PSV file detection
- customizable text and table editors
- customizable column coloring (rainbow coloring)
- syntax validation and highlighting
- code formatting
- quick-fix inspections
- intentions (Alt+Enter), such as Quote/Unquote (all) and Shift Column Left/Right
- spell checking for field values
- an optional information tooltip showing the current value, column header, and column number
- comma, semicolon, colon, pipe, tab, and record-separator value separators
- custom value separators
- line comments (# by default, customizable)
- tab-separator highlighting
(see full changelog)
Note
Release 4.x focuses on text-editor features, and the text editor is the default editor. IntelliJ Platform 2024.2 or newer is required.
Previous versions, including their README files, can still be downloaded and installed manually (see Installation).
The plugin checks CSV files according to the standard defined in RFC 4180, but it tolerates whitespace around quoted values and accepts most literal text. This makes validation less restrictive and keeps the format flexible.
According to the strict standard, the following snippet is invalid because of the whitespace after each comma. The plugin accepts it:
"firstName", "lastName", "birthday"
Syntax errors are still detected and can be inspected. If a document contains syntax errors, features such as the table editor, code formatting, or structure view may be unavailable or may work with incomplete data until the errors are fixed.
CSV files are flexible and can be used for many kinds of data. This has led to several CSV variants, such as semicolon-separated and pipe-separated values, which use a different value separator while keeping the same general format.
The plugin supports file-specific separator settings. It provides predefined comma (,), semicolon (;), colon (:), tab, pipe (|), and record-separator (RS) values. You can also choose a custom separator.
A different separator can be chosen for each CSV file.
The file types TSV (Tab-Separated Values) and PSV (Pipe-Separated Values) are supported as CSV variants. TSV files use a tab as their separator, and PSV files use a pipe. They use the same formatter and code-style settings as CSV files, and support the same features, including the table editor, inspections, and intentions. The .tab extension is also recognized as TSV.
The plugin provides a table editor for CSV, TSV, and PSV files. This editor is separate from the Edit as Table... functionality of IntelliJ IDEA Ultimate, PhpStorm, DataGrip, and other JetBrains IDEs, and it does not share its implementation or settings. It is an alternative to the CSV text editor and is not intended to replace or mirror the capabilities of the JetBrains Data tab.
To switch between the text editor and the table editor, open a CSV, TSV, or PSV file and select the Text Editor or Table Editor tab at the bottom of the editor area. Their order can be changed in Settings > Editor > General > CSV/TSV Editor > Editor Usage. If the Table Editor tab is not shown, check that Text Editor only is not selected and that the file is not too large for the IDE to load.
!!! IMPORTANT !!!
The table editor works best with a syntactically valid CSV file. If the file contains syntax errors, the table editor shows the data it can read but is read-only. Fix the errors in the text editor before continuing to edit the file in the table editor.
A right-click within the table opens a context menu for adding or removing rows. Right-click the table header to add or remove columns.
The actions in these menus apply to the currently selected rows or columns, which may differ from the cell or header where the context menu appears. A right-click does not change the selection by default.
The table editor provides the following keyboard shortcuts for navigation and editing:
-
ARROW KEYS navigate through the table
-
ENTER start/stop editing current cell (NOTE: almost every default key triggers an edit)
-
CTRL+ENTER actual Enter key while editing a cell
-
SHIFT+ENTER stop editing and move to previous row
-
CTRL+SHIFT+ENTER stop editing and move to next row
-
CTRL+SHIFT+LEFT adds a new column before the current cell
-
CTRL+SHIFT+RIGHT adds a new column after the current cell
-
CTRL+SHIFT+DELETE/BACKSPACE deletes the current selected column(s)
-
CTRL+UP adds a new row before the current cell
-
CTRL+DOWN adds a new row after the current cell
-
CTRL+DELETE/BACKSPACE deletes the current selected row(s)
-
DELETE/BACKSPACE clear content of selected cell(s)
Hold CTRL while using the mouse wheel to change the table text size. Hold SHIFT while using the mouse wheel to scroll horizontally.
- Settings/Preferences > Editor > General > CSV/TSV Editor
The plugin provides a customizable text editor and table editor. Their settings can be adjusted in the CSV/TSV editor settings page.
You can choose Text Editor first, Table Editor first, or Text Editor only. This controls the order of the editor tabs and whether the table editor is shown. A Table Editor only option is not available because the table editor cannot edit files with syntax errors.
The predefined separators are , (comma), ; (semicolon), : (colon), | (pipe), tab, and the record separator. A custom separator can also be entered; it must contain at least one character and no spaces.
Default Value Separator defines the separator used for newly created or opened CSV files. You can change the separator for an individual file from the editor's context menu.
The separator of a newly opened CSV file can be detected automatically by comparing the occurrences of predefined separators.
If Auto Detect is enabled (the default), Default Value Separator is used for newly created files and for existing files where no separator can be detected. Otherwise, existing files use the separator detected in their content.
Note: This option has no effect on TSV/PSV files, the separator is pre-defined by their file- and language-type.
The following escape characters are supported: " (double quote) and \ (backslash).
Within a quoted value, the escape character marks a double quote as part of the value instead of the closing quote.
Default Escape Character defines the escape character used for newly opened CSV, TSV, and PSV files. You can change it for an individual file from the editor's context menu.
Define the character or characters used to mark a line as a comment in a CSV document. The default indicator is #.
Enable zero-based column numbering. This affects the information tooltip in the text editor and the column numbering in the table editor.
Choose the coloring method of values. Possible options are:
- Rainbow (Column Color) - values are colored according to their column.
- Simple (Text Color) - values use the configured text color.
All colors can be adjusted via CSV Color Scheme settings.
The current caret row can be highlighted in CSV, TSV, and PSV files. Disable this option if it interferes with custom background colors.
Enable or disable highlighting of tab characters when they are used as the value separator in TSV files, and choose the highlight color. Tabs inside a value are not highlighted.
Enable or disable the information tooltip that appears at the caret position in the text editor. It shows the current value, its header, and its column number.
Choose whether soft wrapping is enabled for CSV, TSV, and PSV files. You can still change this for an individual file by right-clicking the editor's left margin.
If enabled, trailing whitespace is always preserved when editing CSV, TSV, and PSV files, regardless of the general editor setting.
Note: This setting has no effect on the table editor. Unquoted values are trimmed when the table editor opens them. When a value is edited in the table editor, leading or trailing whitespace causes the value to be quoted.
The default and initial height of each table row in pixels.
The default and initial width of a table column in pixels.
The maximum width of a table column in pixels when column widths are adjusted automatically. Set it to 0 to remove the limit. This setting has no effect when you resize columns manually.
If the file ends with a completely empty line (without spaces or tabs), the table editor ignores that line instead of displaying it as empty values. When the file is saved, the existing empty line is retained at the end.
When a value is created or edited in the table editor, always quote it, even when quoting is not required.
CSV elements such as separators (for example commas, pipes, and semicolons), quote characters, escaped text, comments, and values are colored according to the CSV color scheme settings:
- Settings/Preferences > Editor > Color Scheme > CSV/TSV/PSV
The preset colors follow JetBrains IDE defaults and support different UI themes.
In addition to colors and font styles for the different CSV elements, you can define 10 column colors for rainbow coloring. These colors are used when Rainbow is selected as the Value Coloring option in the Editor Settings.
- Settings/Preferences > Editor > Code Style > CSV
Formatting CSV requires care because whitespace can be part of a value. The formatter can add spaces around separators, align values as a table, or trim whitespace according to your settings. Formatting can be disabled by clearing all formatting options.
Apply formatting to CSV documents as you would to code:
- Code > Reformat code (Ctrl+Alt+L)
The following examples use this CSV snippet as input:
"name", "city", "position"
Annasusanna,Amsterdam,1
Ben , Berlin , 2
Adjust spacing around the separator.
Space before separator
"name" , "city" , "position"
Annasusanna ,Amsterdam ,1
Ben , Berlin , 2
Space after separator
"name", "city", "position"
Annasusanna, Amsterdam, 1
Ben , Berlin , 2
Separator settings can be used together with Format as table. Trimming options do not apply when Format as table is enabled.
Format as table
Adds or removes leading and trailing whitespace to format the text as a readable table.
Note: Formatting a CSV file changes its values and can conflict with the visual table editor.
"name ","city ","position"
Annasusanna,Amsterdam,1
Ben ,Berlin ,2
Keep quoted value as is
Note: With this option, quoted values are kept intact. Enabling Enforce value quoting for the table editor can make it easier to edit and format a CSV file in either editor.
"name" ,"city" ,"position"
Annasusanna,Amsterdam,1
Ben ,Berlin ,2
Align right
" name"," city","position"
Annasusanna,Amsterdam, 1
Ben, Berlin, 2
Enhanced width calculation
Calculates text width based on the width of its characters and takes wide characters into account. This can noticeably affect performance on large files.
"name ","city ","position"
Annasusanna,Amsterdam,1
汉字宋 ,Berlin ,2
Trimming can be combined with Space before separator and Space after separator.
Trim leading whitespaces
"name","city","position"
Annasusanna,Amsterdam,1
Ben ,Berlin ,2
Trim trailing whitespaces
"name", "city", "position"
Annasusanna,Amsterdam,1
Ben, Berlin, 2
The editor's context menu lets you change the value separator or escape character used to interpret a specific file. A custom value separator can also be entered.
Note: This changes how the plugin interprets, validates, and highlights the file; it does not change the file's content. Existing separators and escaped values are not replaced or rewritten.
Calculates and sets a width for each table column based on its content. The maximum column width can be changed in the Editor Settings.
Sets all table columns back to their default width. The default column width can be changed in the Editor Settings.
- Settings/Preferences > Editor > Inspections > CSV
Inspections help you fix syntax errors. Press Alt+Enter when the cursor is at an error. The plugin provides three types of inspections:
- Surround with quotes - surrounds the current field with quotes and escapes existing quote characters.
- Add separator - adds a missing separator at the cursor position.
- Add closing quote - adds a missing closing quote at the end of the document.
- Settings/Preferences > Editor > Intentions > CSV
Intentions provide quick ways to adjust the document. Press Alt+Enter to see the intentions available at the current cursor position. The plugin provides six types of intentions:
- Quote All - surrounds all unquoted fields with quotes.
- Quote Value - quotes the unquoted value at the cursor position.
- Unquote All - removes quotes from quoted fields where possible.
- Unquote Value - removes quotes from the quoted value at the cursor position where possible.
- Shift Column Left - moves the column at the cursor position one position to the left.
- Shift Column Right - moves the column at the cursor position one position to the right.
Install the plugin from the JetBrains Marketplace in your IDE (recommended):
- Settings/Preferences > Plugins > Marketplace - search for CSV Editor.
You can also download the plugin package from the JetBrains Marketplace or from GitHub Releases and install it manually:
- Settings/Preferences > Plugins > gear icon > Install Plugin from Disk...
Make sure the file is assigned to the plugin's file type in Settings/Preferences > Editor > File Types. The plugin recognizes .csv, .tsv, .tab, and .psv files.
If another CSV plugin, such as Rainbow CSV, is enabled, the IDE may assign the file to that plugin instead. Check the file type mapping in Settings/Preferences > Editor > File Types and disable the competing plugin for the affected file type if necessary.
If the Table Editor tab is missing, check the table editor settings and make sure Text Editor only is not selected. The table editor is also unavailable for files the IDE cannot load because they exceed the configured file-size limits.
The current plugin release requires IntelliJ Platform 2024.2 or newer. If your IDE is older, disable the plugin and install a plugin release compatible with your IDE from GitHub Releases.
The IntelliJ Platform disables code insight for files larger than its configured limit. To change this limit, open Help > Edit Custom Properties and add or update the following property, using a value in bytes:
idea.max.intellisense.filesize=<maximum-file-size-in-bytes>
Restart the IDE after changing the property.
Contributions are welcome. Please check CONTRIBUTING.md for more information.
Besides source code contributions, feel free to open bug reports or just suggest new features here.
- zoom table-editor cells with Ctrl+Mouse Wheel @royqh1979






