Free tools

TXT to CSV converter

Paste or open a text file and get a CSV. If tabs, pipes, commas or semicolons separate the values, it splits there. If the columns are only lined up with spaces, it finds where each one starts and marks it on a ruler you can click to adjust. Every value stays as written, leading zeros too, and nothing gets uploaded.

CUST_ID   NAME                     ZIP    BALANCE   OPENED
000184    Harbor Dental, LLC       07030    1250.50 2019-04-02
000185    Northwind Supply         94105      89.00 2021-11-15
000186    Lakeside "Bay" Clinic    60601     312.75 2022-06-30
  • Auto picked fixed width: 5 columns, 4 lines.
  • 2 fields are wrapped in quotes because of commas, quotes or line breaks.
  • 4 values have leading zeros and are kept as written. Excel drops leading zeros by default when it opens a CSV.

Your CSV

CUST_IDNAMEZIPBALANCEOPENED
000184Harbor Dental, LLC070301250.502019-04-02
000185Northwind Supply9410589.002021-11-15
000186Lakeside "Bay" Clinic60601312.752022-06-30

Why a text export is harder than it looks

Old systems rarely hand you a CSV. They hand you a text report: one record per line, padded with spaces so it reads well on paper. Excel has a name for it: fixed width. There's no character between the values, so a converter that looks for one finds nothing.

We ran the first three lines of the sample above through four converters on Google's first page for "txt to csv" on October 18, 2026. Three gave back no columns at all: one put each whole line in a single cell, one returned the file unchanged, and one left the lines unsplit. The fourth found the columns but has no column markers or positions you can adjust. Ours found all five, shows every split, and tells you when one cuts through a value.

What the report tells you

Which layout Auto picked
If the column count looks wrong, Auto guessed the wrong layout. Set "Columns are split by" yourself.
A column start cuts through text
A value gets split in two. Click that start on the ruler to remove it and click where it belongs, or type the positions in "Column starts".
A line has a tab
A tab is one position in the file but looks wider on screen, so columns after it can look lined up when they aren't.
Lines with a different number of fields
Usually a value contains the separator itself, like a comma in a company name. Fix those lines, or ask for the export again.
Fields wrapped in quotes
That's normal. The quotes keep a comma inside a value from starting a new column, as RFC 4180 describes.

How it finds the columns

Where the sample's columns start

Shaded: a space on all four lines. Arrows: where each column starts, at positions 1, 11, 36, 43 and 53.

For fixed width, the converter checks each character position across all the lines. A position where every line has a space, or has already ended, is a gap between columns. A column starts at the first position after each gap. Right-aligned numbers stay together, because the spaces in front of them change from line to line.

On Auto, it decides like this:

  1. Tab, pipe, comma or semicolon: the one that gives the same number of values on the most lines, as long as that's more than half of them.
  2. Fixed width instead, when the winner is a comma or semicolon and fixed width finds more columns. A report with amounts like 1,250.50 on every line would otherwise split at the thousands comma.
  3. Fixed width, when no separator fits and the lines share gaps.
  4. One column, when nothing fits.

Excel's Text Import Wizard has you click in a preview to set each break, and the Python library pandas' read_fwf guesses them from the first 100 lines by default. This converter reads every line after the ones you skip, so a long value deep in the file can't get cut in half by a start that only looked right at the top.

Each value loses the spaces around it unless you turn off "Trim spaces in each field". The CSV uses commas and Windows line endings. Files are read as UTF-8, as UTF-16 when they start with a UTF-16 byte order mark, or as Windows-1252 when they aren't valid UTF-8. The file name line says so for UTF-16 and Windows-1252. Files go up to 50 MB.

The sample, start to finish

The sample is a customer list as an old billing system might print it. With the five starts above, the CSV comes out like this:

The CSV the sample becomes

CUST_ID,NAME,ZIP,BALANCE,OPENED
000184,"Harbor Dental, LLC",07030,1250.50,2019-04-02
000185,Northwind Supply,94105,89.00,2021-11-15
000186,"Lakeside ""Bay"" Clinic",60601,312.75,2022-06-30
In blue, the two names that needed quotes: one has a comma, the other has quotes of its own, written twice.

Now set a start at 20, as if you'd clicked the ruler by mistake. It cuts "Harbor Dental" in half:

Line 2 with a column start at 20

Positions 11 to 19Positions 20 to 35
Harbor De||ntal, LLC
The red bar is the start at 20. It lands between two letters, so the report flags it and names line 2.

The same start also falls between "Northwind" and "Supply" on line 3, and that one isn't flagged, because a space sits on one side of it. So check the preview before you download.

Opening the CSV in Excel

The CSV still says 000184 and 07030. Excel may not show them that way: by default, it turns 00123 into 123 when it opens a CSV, and newer versions let you switch that off. Here's how to stop Excel changing them. To check the file before anyone opens it, use the CSV viewer, which shows every cell as written.

Questions

Can I just rename a Notepad file to .csv?
Only if the values are already separated by commas. Renaming changes the file's name, not what's inside it. If the columns are lined up with spaces or split by tabs, convert the file first, or every line ends up as one cell.
How do I open a TXT file in Excel?
Use Excel's Text Import Wizard. It asks the same question this converter does: Delimited, when a character separates the values, or Fixed width, when every value in a column has the same length. The wizard also lets you set a column like an ID or a ZIP code to Text, so it keeps its leading zeros.

When the export is the problem

A text report is often the best export an old system has, and it rarely holds everything. By Rubie's own numbers, 95% of the sources its customers migrate from lack a clean API or export that captures all the data a migration needs. One Rubie customer says some of its own customers have given it 250-page PDFs.

If you run onboarding at a software company and that report is a new customer's data, getting it into a CSV is the easy part. The rest of the job is what we do at Rubie: we move the customer's history out of the system they're leaving and into your product, without engineering time. See how Migration Playbooks run a migration end to end.

// rubie //

Your customers are waiting on data that lives behind a login.

Book a Demo