Simple online tools for developers, networking, text and conversions.

Text Tools

Swap Arbitrary Delimited Columns

Swap two columns in custom-delimited text by delimiter and column selector.

Tool

Use this tool to swap two selected columns in arbitrary delimited text. It is useful for pipe-separated, semicolon-separated, colon-separated, and other custom-delimited formats when column order needs to be fixed quickly.

About this tool

Use this tool to swap two selected columns in arbitrary delimited text. It is useful for pipe-separated, semicolon-separated, colon-separated, and other custom-delimited formats when column order needs to be fixed quickly.

Use swap arbitrary delimited columns when you need a fast browser-based result without extra setup. It works well for quick checks, one-off tasks, and routine formatting or calculation work.

Learn more

Why use this tool

How to use

  1. Put the delimiter on line one
  2. Put the first column selector on line two
  3. Put the second column selector on line three
  4. Leave a blank line
  5. Paste the delimited text below and run the tool

Examples

Example

Input

|
name
role

name|email|role
John|john@example.com|admin
Jane|jane@example.com|user

Output

role|email|name
admin|john@example.com|John
user|jane@example.com|Jane

Useful when a custom-delimited export has the wrong column order.

Example

Input

;
1
3

id;title;status
1;Book;ok
2;Pen;ok

Output

status;title;id
ok;Book;1
ok;Pen;2

Supports 1-based column positions.

Common errors

Using a column that does not exist

Fix: Check the header row or use a valid 1-based column number.

Using more than one character as the delimiter

Fix: Use a single-character delimiter such as ; | : or ,.

Selecting the same column twice

Fix: Use two different selectors.

FAQ

What does Swap Arbitrary Delimited Columns do?

It swaps the positions of two selected columns in custom-delimited text.

Can I select columns by header name?

Yes. You can use exact header names or 1-based column numbers.

What delimiters can I use?

Any single character such as ; | : or ,.

Does it change the field values?

No. It only changes the column order.

When is this tool most useful?

It is useful when custom-delimited columns are in the wrong order for import, export, or review.

Use cases

Related tools