Back to Free Tools

FREE TOOLS

CSV One-Hot Encoder

Replace one categorical CSV column with complete 0/1 indicator columns while preserving exact values and row order.

CSV, TSV, UTF-8 delimited text

CSV, TSV

Browser only

Runs locally in your browser. Your files, pasted content and generated output are not uploaded. Reset clears this tool’s working data.

This tool needs JavaScript. If it does not load, refresh the page and try again.

How to use this tool

  • Paste a rectangular table or choose one UTF-8 file; the selected file takes precedence. The first row must contain nonempty unique headers and at least one data row must follow.
  • Choose comma, tab, semicolon or pipe and one column position starting at 1. Values are compared exactly, including spaces, case, Unicode spelling and empty text.
  • Keep spreadsheet formula protection on unless you need literal output and understand spreadsheet execution risk. Select Process data, then download the complete table. The text preview is limited.
  • Generated headers concatenate the original header, =, and the JSON string literal of the value, such as color="red". Categories follow first appearance; every row has exactly one indicator equal to 1.

Examples

id,color,note
01,red,first
02,blue,second
03,red,repeat
04,,empty

Limitations

  • 5 MiB UTF-8 input; 50,000 data rows; 500 input columns; 500,000 input cells including the header; 20 MiB output. Quoted separators and embedded line breaks are supported; malformed or ragged tables are rejected.
  • Output width is input columns minus one plus distinct categories. Expansion must fit 500 columns and 500,000 cells including the header. Header collisions, including collisions caused by formula protection, are rejected; rename conflicting columns with CSV Header Editor.
  • No trimming, case folding, Unicode normalization, numeric or null inference, category sorting, baseline dropping, rare-category merging or learned vocabulary. Every run discovers its own categories; reusable train/test fitting is not supported.
  • Outputs quote every cell, use CRLF records and UTF-8 without a BOM, and retain the selected delimiter. Tab output is TSV; other supported separators use CSV. Spreadsheet protection is on by default and may prefix formula-like cells and headers with an apostrophe while preserving complete decimal spellings.
  • The downloadable table is complete; the shared text preview is limited to 1,048,576 characters. CSV does not declare spreadsheet cell types; import leading-zero or signed identifiers as text when needed.

Related tools

No items found.

More tools for your workflow

Explore the related desktop tool