ToolNest
100% Free

Transpose CSV

Just upload your CSV file in the form below, and this tool will automatically transpose your CSV. In the tool options, you can specify the character that starts the comment lines in the CSV to remove them. Additionally, if the CSV is incomplete (missing values), you can replace missing values with the empty character or a custom character.

Input CSV

Input preview · 0 rows
Enter CSV on the left to preview
Output

Result

Tool options

Csv input Options

Enter the character used to delimit columns in the CSV input file.

Enter the quote character used to quote the CSV input fields.

Enter the character indicating the start of a comment line. Lines starting with this symbol will be skipped.

Fixing CSV Options

Insert empty fields or custom values where the CSV data is missing (not empty).

What is a Transpose CSV?

Transposing a CSV means swapping rows and columns: what was a row of values becomes a column, and every header lands in the first column of the output. Spreadsheets can do this with a paste-special trick, but when the data lives as a text file — a database export, a test fixture, an API dump — this tool does it in one paste.

The classic use case is data that was recorded the wrong way around: measurements per day arranged as columns when you wanted days as rows, or a lookup table where the keys ran along the top. Transposing once is faster than restructuring the source.

Two groups of options matter for untidy input. The separator and quote-character settings tell the parser how fields are delimited, and the comment character lets you ignore annotation lines that are not part of the table. For ragged rows where columns do not line up, you can fill missing cells with empty values — keeping the grid rectangular — or with a custom placeholder such as N/A, so downstream tools can tell missing data apart from genuinely empty fields.

Like every tool on this site, transposition happens locally in your browser and the data never leaves your machine, so exports with personal or confidential columns are safe to paste. The output is plain CSV text you can copy or save directly, with no file round trip.


Transpose CSV Examples

Click to try!

Transpose a 2x3 CSV

This example transposes a CSV with 2 rows and 3 columns. The tool splits the input data by the comma character, creating a 2 by 3 matrix. It then exchanges elements, turning columns into rows and vice versa. The output is a transposed CSV with flipped dimensions

Csv input Options

Enter the character used to delimit columns in the CSV input file.

Enter the quote character used to quote the CSV input fields.

Enter the character indicating the start of a comment line. Lines starting with this symbol will be skipped.

Fixing CSV Options

Insert empty fields or custom values where the CSV data is missing (not empty).

Transpose a Long CSV

In this example, we flip a vertical single-column CSV file containing a list of our favorite fruits and their emojis. This single column is transformed into a single-row CSV file and the rows length matches the height of the original CSV.

Csv input Options

Enter the character used to delimit columns in the CSV input file.

Enter the quote character used to quote the CSV input fields.

Enter the character indicating the start of a comment line. Lines starting with this symbol will be skipped.

Fixing CSV Options

Insert empty fields or custom values where the CSV data is missing (not empty).

Clean and Transpose CSV Data

In this example, we perform three tasks simultaneously: transpose a CSV file, remove comments and empty lines, and fix missing data. The transposition operation is the same as flipping a matrix across its diagonal and it is done automatically by the program. Additionally, the program automatically removes all empty lines as they cannot be transposed. The comments are removed by specifying the "#" symbol in the options. The program also fixes missing data using a custom bullet symbol "•", which is specified in the options.

Csv input Options

Enter the character used to delimit columns in the CSV input file.

Enter the quote character used to quote the CSV input fields.

Enter the character indicating the start of a comment line. Lines starting with this symbol will be skipped.

Fixing CSV Options

Insert empty fields or custom values where the CSV data is missing (not empty).

Enter the character used to fill missing values in the CSV input file.


All CSV Tools

Convert CSV to JSON

Convert CSV data to JSON format.

Change CSV Separator

Change CSV file delimiter

You May Also Like

Resize Image

Resize one or multiple images at once.

Compress Images

Compress one or multiple images at once.

Split PDF

Extract specific pages from a PDF file

Rotate PDF

Rotate pages in a PDF document

Remove duplicate lines

Quickly delete all repeated lines from text

Base64 Encoder/Decoder

Encode or decode data using Base64.

We use cookies

We use cookies for analytics and advertising. You choose what's enabled. Essential cookies are always on. Privacy Policy