CSV Tools

One-Hot Encode

Convert categorical values into binary columns

CSV Input

Try a sample:

Options

Provide CSV input above to select a column.

CSV Output

Select a categorical column to one-hot encode it...

More Options

CSV Format

Input

How to Use This Tool

This tool one-hot encodes a single CSV column. Pick the categorical column and the tool appends one new binary column per unique value, named <column>_<value>. Useful for prepping data for machine learning, regression, or any analysis that needs categorical fields expressed as numeric indicators.

  1. Provide your CSV — Paste CSV text into the input area, drop a CSV file onto the File tab, or enter a URL on the URL tab.
  2. Pick a column — The tool reads the unique values in first-appearance order. Empty cells become a <column>_blank indicator. Toggle true/false if you’d rather not use 1/0.
  3. Download — Copy the result or save as a .csv. The original column is preserved unchanged; new columns are appended at the end.

FAQ

4 questions
Does this tool upload my data?
No. Encoding runs entirely in your browser. Your CSV data is never sent to a server.
What is one-hot encoding?
One-hot encoding turns a categorical column into a set of binary columns — one column per unique value. The cell is 1 (or true) when the original value matches that category and 0 (or false) otherwise. It's a standard preprocessing step for machine learning and many statistical tools that don't accept text categories directly.
Are values normalized before encoding?
No. 'Yes', 'yes ', and 'YES' are treated as three distinct categories. If you want them combined, run a trim-whitespace or change-case tool first, then re-upload here.
Why does it stop me from encoding columns with too many unique values?
Encoding a column with thousands of unique values would create thousands of new columns and could freeze your browser tab. The tool warns at 100 unique values (with an 'Encode anyway' override) and refuses outright above 1,000. For high-cardinality columns, you usually want a different transformation — bucketing, hashing, or target encoding — not one-hot.

More Transform Data Tools

2 tools

More CSV Tools

92 tools