CSV to C array
Conversion runs locally in your browser. No data is uploaded to the server.
Convert a spreadsheet or CSV column into a C array, or turn a whole CSV into an array of structs, for calibration tables and lookup tables in firmware.
Conversion runs locally in your browser. No data is uploaded to the server.
Calibration curves, ADC-to-temperature tables, gamma tables, and sine tables are often built and checked in a spreadsheet first. This tool takes that CSV export and turns one column into a flat C array, ready to declare as const data in firmware without retyping values by hand.
Single column mode picks one column and generates a flat array such as const uint16_t lookup_table[]. Array of structs mode uses every column, generating a typedef struct with one field per column and one initializer per CSV row, which keeps related values like an ADC code and its calibrated temperature together in a single entry.
Pick the C type that matches your target: uint16_t is common for raw ADC codes, float or double for calibrated physical values, and 8/16/32-bit signed or unsigned integers for packed protocol data. Hex output is useful for register values or bit masks, while decimal is easier to read for calibration data.
Yes. Choose Single column mode and pick the column from the dropdown, which is populated from your header row or generated column names.
It converts every column into one C struct with a field per column, and every CSV row into one struct initializer, which is useful for lookup tables that pair a raw value with a calibrated value.
Yes. Negative values are encoded using two's complement for the selected bit width, matching how signed integer types are represented in memory.
The tool treats it as 0 and shows a warning with the count of invalid values, so you can go back and fix the source data.
No. Parsing and code generation run locally in your browser JavaScript, and no data leaves your device.