🔒 No uploads · 100% in your browser

Convert CSV to Fixed-Length Format in Seconds

TangoText converts a CSV to a fixed-length file in your browser. You set each field’s start position, length, alignment and padding character, add header and trailer records, and even define different layouts for different record types. Your file is never uploaded.

Start for free — no account needed See it in action →

Free plan: 5 files/month. First 3 require no account at all.

🔒No uploads — ever
⚡Works in your browser
✓No install required
🆕Free to start

Three steps from CSV to fixed-length file

TangoText reads your file locally and converts it using rules you define — no data ever leaves your machine.

1

Load your CSV

Drag and drop or browse to your file. TangoText reads it instantly in your browser — nothing is uploaded.

2

Map and configure columns

Set each column's fixed width, alignment (left/right), and padding character. Reorder or exclude columns as needed.

3

Download your flat file

Click Generate Output. TangoText writes the fixed-length file, and you download it directly to your computer.

Everything you need for fixed-length conversion

↔️

Custom column widths

Set exact character widths for each field. TangoText pads shorter values and cuts longer ones to fit, so check your widths against the longest value in each column.

◽

Padding and alignment

Left-align text with trailing spaces or right-align numbers with leading zeros — exactly as your mainframe or ERP expects.

🧩

Multi-record layouts

Need different record types in one file? Add more than one layout, each with its own start positions, lengths and padding. A layout applies to rows where a field equals, or starts with, a value you choose. Rows that match no layout use the default layout, and a layout can exclude its matching rows.

🏷️

Custom headers and trailers

Add header and trailer records built from tokens: today’s date or date and time, file name, record count, total rows, count of rows where a field matches, sum of a field, count of a field, and custom text. Totals reflect only the rows actually written.

🔄

Format Values

Standardise field values before output: normalize dates to YYYYMMDD, strip currency symbols, fix phone formats, and clean up case — all before the fixed-length file is written. Available free on all plans.

🔍

TangoSense auto-scan

Before you export, TangoSense scans your data for PII columns, mixed date formats, blanks, and duplicate IDs — flagging anything worth fixing with one-click corrections. Nothing is uploaded.

🎭

Data masking

Scramble, keep the format, or hide all but the last characters of sensitive fields before writing the output. Use a repeatable passphrase so masked files stay consistent across runs.

💾

Reusable templates

Save your column mapping, widths, and Format Values settings as a reusable template. Re-run next month's file in seconds (Solo & Team plans).

🔒

Zero-upload privacy

All processing runs in JavaScript in your browser tab. No server ever sees your data.

🖥️

No install needed

Open tangotext.com/app and start converting. Works in any modern browser.

Clean your data on the way out

Fixed-length files are often consumed by systems that expect exact formats. Format Values lets you standardise every field before it's written — no pre-processing step required. Free on all plans.

📅

Dates

Normalize mixed formats — Mar 25, 2024 / 2024/03/25 / 25-Mar-2024 — to a consistent output like YYYYMMDD or any format your target system requires.

🔢

Numbers

Control decimal places, remove or add commas, strip currency symbols ($1,234.50 → 1234.50), or zero-pad to a fixed digit count.

🔤

Text & case

Convert to title case, uppercase, or lowercase. Trim leading/trailing spaces, remove unwanted characters. " jane SMITH " → "Jane Smith".

📞

Codes

Reformat phone numbers to (416) 555-1234, SSN/SIN to 123-45-6789, and postal codes to their canonical forms.

Four ways to convert CSV to fixed-width

You can write a script, use Excel, use an online converter, or use TangoText. Here is how they compare when the file contains payroll, HR or banking data.

MethodSkill neededWhere your data goesNotes
Python (pandas)Write and maintain a scriptYour machineFull control, but you code the padding, truncation and any header or trailer yourself.
Excel, Save as .prnNo codeYour machineWidths come from the on-screen column widths, so you have to stretch columns to avoid cutting data. No header or trailer records, and limited control over padding.
Online converter websitesNo codeMany upload your file to their serverQuick for simple files, but check the privacy terms before using one with sensitive data.
TangoTextNo codeYour browser; the file is never uploadedPer-field start, length, alignment and padding. Multi-record layouts, header and trailer records, Format Values, TangoSense, TangoCheck and data masking.

Convert sensitive files without uploading them

Fixed-length files often carry payroll, benefits, banking or customer records. TangoText reads and converts your file entirely in your browser, so it is never sent to a server. You can also mask sensitive fields (scramble them, keep their format, or hide all but the last characters) before the output is written.

Common questions

Is my file uploaded to a server?
No. TangoText processes everything in JavaScript running in your browser tab, so your file is never sent to any server and stays on your own machine.
Can I create a multi-record fixed-width layout?
Yes. Add more than one layout, and give each its own start positions, lengths, alignment and padding. A layout applies to rows where a field equals, or starts with, a value you choose, so header, detail and other record types can each get their own format. The first matching layout wins, rows that match none use the default layout, and a layout can instead exclude its matching rows from the output.
Can I add a custom header and trailer record?
Yes. On output you can add header and trailer records built from tokens: the current date or date and time, file name, record count, total rows, a count of rows where a field matches a value, the sum of a field, the count of a field, and custom text. Counts and sums reflect only the rows that are written to the file.
How do I convert a CSV to fixed-width in Excel?
Open the CSV with Data → From Text/CSV, then choose File → Save As and pick Formatted Text (Space-delimited) (*.prn). Excel sets each field’s width from the width of its column on screen, so widen your columns first or data gets cut off. It can’t add header or trailer records or give you per-field padding control, which is where a dedicated tool such as TangoText helps.
What is a fixed-length (flat) file?
A fixed-length file is a text file where each field occupies an exact number of characters, padded or truncated to fit. They're common with legacy mainframe systems, government submissions, financial data exchanges, and ERP integrations where a column-based structure is required.
Can I save my column widths and come back later?
Yes. On Solo and Team plans, you can save your entire configuration — column widths, alignment, padding, and Format Values settings — as a named template. Load the same template next month and convert in seconds.
What does TangoSense do?
TangoSense scans your loaded file, right in your browser, and flags things worth a closer look: columns that may contain PII (emails, phone numbers, SSN/SIN, card numbers) and data problems like mixed date formats, blanks, repeated IDs, and likely typos. Each suggestion applies with one click and can be undone just as easily. Nothing is uploaded.
What does Format Values do?
Format Values lets you standardise field values before the fixed-length file is written: normalize date formats, fix number formatting, clean text case and spaces, and reformat phone numbers and codes. It's available on all plans, including Free.
What does it cost?
The Free plan lets you convert 5 files per month, with the first 3 requiring no account. Paid plans start at $7.50/month (Solo, billed annually) for unlimited conversions, templates, and TangoCheck validation with 30 rule types. Team plans add shared templates for up to 5 users from $24.17/month.

Related guides

Convert CSV to XMLRename and reorder columns, then download clean XML.Convert Excel to XMLTurn XLS and XLSX spreadsheets into structured XML in your browser.Validate CSV DataCheck every row against 30 rule types before the file goes anywhere.Reformat Data Files Without CodeRename columns, change delimiters and standardise values with no scripts.

Browse all TangoText guides →

Start converting CSV to fixed-length format

Free plan. No account needed for your first 3 files. Your data never leaves your browser.

Open TangoText free →

No install. No upload. No credit card.