ARFF Converter

Convert Weka ARFF datasets to CSV and back in your browser, preserving numeric, nominal, string and date attribute types.

Try:
Converted dataset

Convert ARFF and CSV datasets locally

Weka's ARFF format stores a relation name, typed attributes and a data section. This converter turns ARFF into CSV for spreadsheets and notebooks, or turns CSV back into ARFF for Weka-style machine-learning workflows. Everything runs in the browser with the same pure-Rust core used by the CLI and chat tool.

Worked examples

ARFF to CSV:

@relation weather
@attribute outlook {sunny,overcast,rainy}
@attribute temperature numeric
@data
sunny,85
rainy,70

With direction ARFF → CSV, the output is:

outlook,temperature
sunny,85
rainy,70

CSV to ARFF:

outlook,temperature
sunny,85
rainy,70

With relation weather, the converter infers temperature as numeric and outlook as a nominal label set because it has only a few distinct values.

Preserving attribute types

CSV has no native place to store ARFF attribute types. Enable Include/consume CSV type row when converting ARFF to CSV to add a second row containing each attribute type. Convert that CSV back with the same option enabled and the ARFF header keeps numeric, string, date and nominal declarations instead of guessing. You can also force types with column_types, for example class:nominal,id:string,3:date.

Supported ARFF details

The converter handles % comments, quoted names and values, escaped newlines and tabs, nominal {a,b,c} label sets, date attributes with a format pattern, missing values as ?, dense rows, sparse {index value, ...} rows and trailing instance weights. Relational multi-instance attributes are intentionally rejected with a clear error because flattening them is schema-specific.

FAQ

How are CSV column types inferred?

All-numeric columns become numeric. Non-numeric columns with at most the nominal threshold of distinct values become nominal attributes such as {yes,no}. Larger text columns become string. You can override any column by name or 1-based index with column_types.

How do I keep ARFF types during a round trip?

Turn on Include/consume CSV type row when converting ARFF to CSV. The CSV then has a second row with type declarations. When converting back to ARFF with the same option, those declarations are used instead of guessing from data.

Can it read sparse ARFF rows?

Yes. Sparse rows are expanded to dense CSV cells using type-aware defaults: zero for numeric attributes, the first label for nominal attributes, and empty text for string/date attributes. When writing ARFF you can choose dense or sparse row output.

What happens to missing values?

ARFF ? values become empty CSV cells by default. Set a missing-value token such as NA if your CSV workflow needs an explicit marker; the same token is read back as ? when converting CSV to ARFF.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool arff-converter "@relation weather
@attribute outlook {sunny,overcast,rainy}
@attribute temperature numeric
@data
sunny,85
rainy,70"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/arff-converter/?data=%40relation%20weather%0A%40attribute%20outlook%20%7Bsunny%2Covercast%2Crainy%7D%0A%40attribute%20temperature%20numeric%0A%40data%0Asunny%2C85%0Arainy%2C70&direction=auto&delimiter=%2C&header=true&relation=weather&nominal_threshold=10&column_types=class%3Anominal%2C2%3Anumeric%2Cdate%3Adate&date_format=yyyy-MM-dd%27T%27HH%3Amm%3Ass&missing_value=NA&arff_format=dense&type_row=true

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.