Convert CSV to Fixed-Width Text Format

Convert CSV data into fixed-width positional text with configurable column widths, padding characters, and alignment options.

Basic Conversion

Detailed Explanation

CSV to Fixed-Width Conversion

When you need to produce fixed-width output — for example, to feed data into a mainframe, generate a banking file, or create a print-ready report — this converter takes standard CSV input and pads each field to the exact width required.

Example CSV Input

Name,Amount,Status
Alice,1234.56,Active
Bob,78.90,Inactive
Charlie,45678.12,Active

Column Configuration

Column Width Alignment Pad Char
Name 15 Left Space
Amount 12 Right Space
Status 10 Left Space

Fixed-Width Output

Alice              1234.56Active
Bob                  78.90Inactive
Charlie          45678.12Active

Padding and Alignment

  • Left alignment pads with spaces (or zeros) on the right side of the value
  • Right alignment pads on the left — common for numeric fields
  • Zero padding is useful for financial file formats where 0000123.45 is required
  • Values longer than the column width are truncated to fit

Handling Special Cases

The converter uses the CSV header row to match columns to your definitions. If a CSV column does not match any defined column name, it is skipped. If a defined column has no matching CSV header, its output positions are filled with the padding character.

Use Case

Generating fixed-width output files for mainframe batch processing, banking file formats (ACH/NACHA), or creating formatted reports with precise column alignment.

Try It — Fixed Width ↔ CSV Converter

Open full tool