Convert ARFF to CSV
Convert Weka ARFF datasets to CSV with Weka or Python and check schema and missing-value loss.
Make CSV files online
We can't read ARFF files yet, so this conversion isn't available. If you can export your work to one of these formats - or others - we'll turn it into CSV:
How to convert arff to csv file
- Other formats
- Rating: 5.0/5
Teams convert Weka datasets when Excel, a database importer, or a collaborator expects a flat CSV table instead of ARFF declarations. CSV is easier to inspect and exchange, but the conversion removes schema information stored in the ARFF header.
ARFF and CSV formats
ARFF (Attribute-Relation File Format) is a plain-text dataset format used primarily by the Weka machine-learning software. An ARFF file contains a header with a relation name and @ATTRIBUTE declarations, followed by an @DATA section containing records.
Attributes can be numeric, nominal, string, date, and, in Weka, relational. A nominal declaration such as @ATTRIBUTE class {yes,no} defines both the field type and its allowed values. ARFF can also store sparse rows such as {0 1,3 blue}, where omitted values use the format's default value.
CSV stores a flat table as delimiter-separated rows, normally with column names in the first row. Spreadsheet applications, pandas, R, database import tools, and many data portals accept CSV directly. CSV has no standard type declarations, nominal-value lists, relation name, comments, or sparse-row notation.
Convert with Weka
Weka is the most reliable desktop converter because it reads ARFF headers, quoted values, missing values, nominal attributes, and sparse instances.
- Open Weka and start Explorer.
- On the Preprocess tab, select Open file... and choose the
.arfffile. - Check the attribute list and instance count to confirm that Weka loaded the expected dataset.
- Select Save..., choose
CSV data files (*.csv), enter an output name such asdataset.csv, and save. - Open the result in a text editor or the intended destination program and verify the header row, delimiter, character encoding, and missing-value representation.
For repeatable conversions, run Weka's CSV saver from a terminal. Replace /path/to/weka.jar with the installed Weka JAR path:
java -cp /path/to/weka.jar weka.core.converters.CSVSaver -i input.arff -o output.csv
On Windows, quote paths containing spaces, for example "C:\Program Files\Weka-3-8\weka.jar". Use the Weka installation's supplied launcher or classpath configuration if its version requires additional libraries.
Convert with Python or an online service
pandas does not natively read ARFF files; it needs an ARFF parser. For ordinary dense ARFF files, install liac-arff and pandas:
pip install liac-arff pandas
import arff
import pandas as pd
with open("input.arff", encoding="utf-8") as source:
dataset = arff.load(source)
columns = [name for name, _ in dataset["attributes"]]
pd.DataFrame(dataset["data"], columns=columns).to_csv("output.csv", index=False)
Test sparse ARFF files before using a Python parser in production; Weka is the safer choice when sparse instances, unusual quoting, or Weka-specific attribute definitions are involved.
For a small non-confidential file, browser services such as Zamzar and Convertio may offer ARFF-to-CSV conversion. Confirm current ARFF support and retention terms before uploading. Do not upload customer, medical, financial, research, or proprietary datasets to an external conversion service.
Compatibility checks
Preserve the original ARFF file. CSV retains values but loses declared types, relation names, attribute comments, nominal-value restrictions, and other header metadata. Keep the ARFF header or document the schema separately when recipients must distinguish numbers, dates, categories, and free text.
ARFF missing values are commonly written as ?. Depending on the converter, the CSV output may contain an empty field, ?, or another marker. Check this before importing into software that treats blanks, NA, and question marks differently.
CSV fields containing commas, quotation marks, or line breaks must be quoted according to CSV rules. Do not convert ARFF by replacing commas or splitting lines with basic text commands; those methods corrupt quoted values and cannot expand sparse rows.
Some spreadsheet installations expect a semicolon rather than a comma because of regional settings. If columns appear in one cell after opening the file, use the spreadsheet's text-import dialog and explicitly select the delimiter rather than editing the CSV manually.
ARFF vs CSV: format comparison
How the ARFF and CSV formats compare on the properties that matter most for this conversion.
| Property | .ARFF Attribute-Relation File Format | .CSV Comma-Separated Values |
|---|---|---|
| Plain-text readable | Yes | Yes |
| Data types | Typed | Typed |
| Nested structures | No | No |
| Formulas | No | No |
| Multiple tables or sheets | No | No |
| Typical file size | Small | Small |
| Open standard | Partly open | Yes |
| Best used for | Data exchange | Data exchange |
| Developer | University of Waikato / WEKA project | — |
| MIME type | text/arff | text/csv |
Suggested software and links: arff to csv converters
Frequently asked questions
Will ARFF attribute types and nominal value lists be preserved in CSV?
No. CSV preserves the table values but not the ARFF relation name, attribute declarations, data types, or predefined nominal-value lists, so those may need to be recreated when the CSV is imported.
Are missing values and sparse ARFF data changed when exported to CSV?
Missing values may be written using the exporting software's CSV representation, while sparse ARFF records are expanded into ordinary rows with a value for every column. Check the result before using it for analysis, especially if empty cells could be confused with actual empty text.
Will ARFF strings containing commas or quotes work correctly in CSV?
They should be enclosed and escaped according to CSV rules, but an incorrect export can split one ARFF value into multiple columns. This commonly happens with text or nominal values containing commas, quotation marks, or line breaks.
Can I convert CSV back to ARFF without losing information?
Not without restoring information that CSV does not contain, such as attribute types, nominal categories, the relation name, and some missing-value conventions. The data can usually be reconstructed, but the original ARFF schema and formatting are not guaranteed to return automatically.
Additional formats for
arff file conversion
Reverse conversion
Convert to csv from
other formats
- bin to csv
- mat to csv
- cap to csv
- dta to csv
- ris to csv
- bak to csv
- rpt to csv
- stdf to csv
- hst to csv
- sqlite2 to csv
- 1pif to csv
- accdp to csv
- ade to csv
- akpg to csv
- arc to csv
- art to csv
- as to csv
- asc to csv
- ast to csv
- bdb to csv
- bibtex to csv
- crtx to csv
- db2 to csv
- des to csv
- dex to csv
- dlv to csv
- dwg to csv
- dxf to csv
- eddx to csv
- edx to csv
- enc to csv
- enw to csv
- fgdb to csv
- fp4 to csv
- fpt to csv
- gan to csv
- gform to csv
- gif to csv
- grind to csv
- gsb to csv
- iff to csv
- inf to csv
- jpeg to csv
- jpg to csv
- lqm to csv
- mdt to csv
- mmb to csv
- mpx to csv
- mso to csv
- nokia to csv
- npi to csv
- odc to csv
- osbx to csv
- ots to csv
- out to csv
- pcapng to csv
- pfd to csv
- pmdx to csv
- pmw to csv
- png to csv
- por to csv
- prn to csv
- psc to csv
- psd to csv
- pxl to csv
- qpw to csv
- rgb to csv
- rpmsg to csv
- sbp to csv
- sdc to csv
- sdd to csv
- sl2 to csv
- sl3 to csv
- smea to csv
- spd to csv
- spv to csv
- srs to csv
- sta to csv
- stc to csv
- stx to csv
- svg to csv
- sxi to csv
- tab to csv
- tap to csv
- taxform to csv
- tdl to csv
- trc to csv
- tsi to csv
- vmg to csv
- vor to csv
- wb2 to csv
- wbd to csv
- wk3 to csv
- wk5 to csv
- wki to csv
- wkq to csv
- wks to csv
- word to csv
- wq1 to csv
- wq2 to csv
- xcel to csv
- xhb to csv
- xl to csv
- xla to csv
- xlc to csv
- xlmx to csv
- xlr to csv
- xlshtml to csv
- xlsmhtml to csv
- xlt to csv
- xltx to csv
- xmlx to csv