Celtrim

Convert a TXT file to Excel

Drop a text file or paste your rows and download a real .xlsx workbook — with product codes, long numbers, and dates surviving the trip intact.

Nothing is uploaded — the text stays in this tab.

Free · no sign-up · processed on your device

How it works

  1. 01

    Drop the .txt file or paste the text

    Tab, semicolon, pipe, or space aligned text all work, as do rows copied from a terminal, an email, or another spreadsheet.

  2. 02

    Check the preview

    Numbers and dates are right-aligned exactly as they will be in Excel. Anything left-aligned is staying text, so mistakes are visible before you download.

  3. 03

    Download the .xlsx

    You get a real workbook with a bold, frozen header row and filter arrows — not a renamed text file that Excel has to guess at.

Getting text into Excel is easy. Getting it in without damage is the hard part. A text file carries no type information — every column is just characters — so something has to decide whether 007 is a number, whether 03/04/2026 is March or April, and whether a 19-digit account number is a quantity. Excel makes those decisions for you, silently, using your machine's locale and a General column format that rounds and reformats as it sees fit. This converter makes the decisions explicitly, shows you what it chose, and only then writes the workbook.

Four ways a plain import damages your data

Leading zeros disappear
Product code 007 becomes the number 7 and a zip code 01234 becomes 1234. The converter keeps any number that starts with a zero as text, because those are identifiers rather than quantities.
Long numbers turn into 1.2346E+18
A double can only hold about 15 significant digits, so account numbers, IMEIs, and long IDs get silently rounded. Anything longer than 15 digits stays text here.
Dates change meaning
03/04/2026 is March 4th in the US and April 3rd almost everywhere else, and Excel decides based on your machine. Only unambiguous ISO dates like 2026-03-04 are converted; the rest stay exactly as written.
Fields starting with = become formulas
A value beginning with =, + or @ is executed as a formula when a text file is opened. Those are written as text, which is also the standard defence against CSV injection.

Every one of these is a toggle you control, so if you actually do want 007 read as seven, turn Keep leading zeros off and the preview updates immediately.

What you get in the workbook

  • A bold header row, frozen so it stays visible, with filter arrows already switched on.
  • Column widths sized to the content instead of a wall of hash marks.
  • Real numeric cells you can sum, sort, and chart without converting anything first.
  • Real date cells in ISO format, ready to be reformatted however you like.

Need a CSV rather than a workbook? Convert the same text to CSV instead — same parser, different output.

Common questions

How do I convert a TXT file to Excel?
Drop the .txt file onto the converter above. The separator between the columns is detected automatically, the parsed table is shown so you can check it, and the download gives you an .xlsx workbook. There is no import wizard and no need to rename anything.
Why not just rename the file to .xlsx?
Renaming does not work at all. An .xlsx file is a zip archive of XML parts, not text, so Excel refuses a renamed .txt outright or warns that the file is corrupt. The file has to be genuinely rebuilt in the xlsx format, which is what this converter does.
What about the Text Import Wizard in Excel?
It works, but every column defaults to General, which is where leading zeros and long numbers get destroyed. Fixing that means setting each column to Text by hand, every time you import. This converter applies those rules automatically and shows you the result first.
My text uses spaces to line up the columns. Will that work?
Yes. Choose Aligned spaces as the separator, or leave detection on and it is usually picked automatically. Columns separated by runs of two or more spaces, like output from a terminal or a PDF, are split correctly while multi-word values stay in one cell.
Does it keep my product codes and zip codes intact?
Yes, as long as Keep leading zeros is on, which it is by default. Values like 007 and 01234 are written as text, so Excel shows them exactly as they appeared in your file. The preview counts how many values were protected this way.
Which dates get converted to real dates?
Only ISO format ones: 2026-03-04, or 2026-03-04 14:30. Those are unambiguous worldwide. Formats like 03/04/2026 or 4 March 2026 are left as text on purpose, because guessing at them is how a whole column quietly shifts by months.
Is my file uploaded to a server?
No. The text is parsed and the workbook is built in your browser with local JavaScript. The file never leaves your device, and nothing is stored or logged.
How large a file can it handle?
Tens of thousands of rows convert without trouble, since the work happens on your own machine. Extremely large files are limited more by your browser's memory than by the converter.