Skip to content
New: 17 free file converters that never upload your files
File Converter Guides

How to Convert a Text File to Excel: Clean Columns, Leading Zeros and a Free Converter

How to convert a text file to Excel with columns: use our free TXT to CSV converter, Excel import, Google Sheets or LibreOffice and keep leading zeros.

How to convert a text file to Excel: LeadCanal guide cover
On this page
  1. How to convert a text file to Excel: which method fits your file?
  2. What kind of text file do you have?
  3. Method 1: Use the free converter, then open the result in Excel
  4. Method 2: Import with Data > From Text/CSV in Excel
  5. Method 3: Use the Text Import Wizard for fixed-width files
  6. Method 4: Split pasted text with Text to Columns
  7. How do you convert a text file to Excel on a Mac?
  8. Can you do it without Excel installed?
  9. How do you keep leading zeros and long numbers?
  10. What if the text file is too big for Excel?
  11. Why it matters that the file stays on your device
  12. Troubleshooting: common problems and fixes
  13. What to do with the spreadsheet next
  14. Frequently asked questions
  15. Conclusion: key takeaways
  16. Editorial policy
  17. Content transparency
  18. About the author

Here is how to convert a text file to Excel in one sentence: split the text into columns first, then save it as a workbook. The fastest route is our free TXT to CSV converter, which detects the separator, builds a clean CSV that Excel opens straight into columns, and never uploads your file. If you prefer to stay inside Excel, Data > From Text/CSV does the same job with a few more clicks.

We clean text exports from CRMs and old databases every week, so this guide covers the methods we use and the usual problems: one long column, lost leading zeros, broken accents and oversized files.

Quick answer: To turn a .txt file into an Excel spreadsheet with proper columns:

  • Fastest: drop the file into the TXT to CSV converter, download the CSV, open it in Excel and save as .xlsx.
  • Inside Excel: Data > From Text/CSV, pick the delimiter, then Load and save as Excel Workbook.
  • Zip codes or IDs: set those columns to Text during import so the leading zeros stay.
  • Never just rename .txt to .xlsx. Excel will refuse or show one column.

Free LeadCanal tools for this guide

Check and fix it yourself in a few seconds, no signup needed.

TXT to CSV →CSV Splitter →Bank Statement to Excel →Extract Emails →

How to convert a text file to Excel: which method fits your file?

Every method does the same two things: it finds the character that separates the columns, and it tells Excel what type of data sits in each column. The right choice depends on where you are working and how sensitive the file is.

Method Cost Upload needed? Best for
LeadCanal TXT to CSV converter Free No, runs in your browser Quick, private conversion of any delimited text, many files at once
Excel Data > From Text/CSV Included with Excel No Repeat imports you want to refresh, setting column types
Excel Text Import Wizard (legacy) Included with Excel No Fixed-width reports and column-by-column formats
Text to Columns Included with Excel No Text that is already pasted into column A
Google Sheets Free Yes, to Google Drive No Excel installed, need an .xlsx download
LibreOffice Calc Free No Offline desktop option on Windows, Mac or Linux
Python (pandas) Free No Hundreds of files or a scheduled job

What kind of text file do you have?

Open the file in Notepad or TextEdit and look at one line. The separator decides everything that follows.

What the line looks like File type What to choose on import
Jane Lee    jane@acme.com    Austin Tab delimited (.txt, .tsv) Tab
Jane Lee|jane@acme.com|Austin Pipe delimited (database exports) Other: |
Jane Lee;jane@acme.com;Austin Semicolon delimited (European Excel) Semicolon
Jane Lee,jane@acme.com,Austin Comma delimited (already CSV) Comma
Values lined up under each other with spaces Fixed width (.prn, .dat, reports) Fixed width, or “2 or more spaces”
One email or name per line Single column list No delimiter needed

Method 1: Use the free converter, then open the result in Excel

This is the route we use when a client sends a messy export and we just need it in a spreadsheet. Open the free TXT to CSV converter and follow these steps:

  1. Add the file. Drop a .txt, .tsv, .dat, .prn or .log file, choose several at once, or paste the rows into the box.
  2. Check the separator. Leave “Detect automatically” on. It recognises tabs, commas, semicolons, pipes and runs of spaces. Pick one yourself, or type any other character, if the preview looks off.
  3. Keep “Excel friendly” ticked. It adds a UTF-8 marker so accents, currency symbols and non-English names open correctly.
  4. Pick the CSV separator. Comma is standard. Choose semicolon if your Excel uses a comma as the decimal mark, which is common in Europe.
  5. Convert and preview. Click Convert to CSV, check the first 30 rows in the preview table and the row and column count, then download.
  6. Save as a workbook. Open the CSV in Excel, then File > Save As > Excel Workbook (.xlsx).

The converter also quotes values that contain commas, pads short rows so every row has the same number of columns, and handles Windows, Mac and Linux line endings.

A worked example from our own files

A typical case for us: an old CRM exports contacts as a pipe-separated .txt file with Name, Company, City, Phone and ZIP. Opening it straight in Excel puts the whole line in column A. We drop it into the converter, it reports the pipe as the separator, and the preview shows five clean columns with “Austin, TX” wrapped in quotes so it stays in one cell.

Because the file has ZIP codes such as 02134, we then bring the CSV in through Data > From Text/CSV and set ZIP and Phone to Text (see Method 2), instead of double-clicking it. Two minutes later it is an .xlsx with every leading zero in place.

Method 2: Import with Data > From Text/CSV in Excel

This is Microsoft’s current import tool (Power Query) in Excel for Microsoft 365, 2021, 2019 and 2016 on Windows.

  1. Open a blank workbook and go to the Data tab.
  2. In the Get & Transform Data group, click From Text/CSV and choose your .txt file.
  3. In the preview, set File Origin to 65001: Unicode (UTF-8) if accents look wrong, and pick the right Delimiter.
  4. Click Load if the preview looks right. If you need to protect IDs, click Transform Data instead, select those columns, choose Data Type > Text, then Close & Load.
  5. Save with File > Save As > Excel Workbook (.xlsx).

The data arrives as a table linked to the source file, so Data > Refresh All repeats the import when the text file changes. Microsoft documents the column type steps in its guide to keeping leading zeros and large numbers.

Method 3: Use the Text Import Wizard for fixed-width files

The older three-step wizard is still the clearest way to handle report-style files where columns are lined up with spaces. In current Excel you switch it on once under File > Options > Data > Show legacy data import wizards, then use Data > Get Data > Legacy Wizards > From Text (Legacy).

  1. Step 1: choose Delimited or Fixed width, the row to start at and the file origin.
  2. Step 2: tick the delimiters, or for fixed width click in the preview to set column breaks.
  3. Step 3: click each column and set its format to General, Text or Date. Advanced lets you change the decimal and thousands separators.

The full option list is on Microsoft’s Text Import Wizard page.

Method 4: Split pasted text with Text to Columns

If the text is already sitting in column A, you do not need to import again. Select the column, go to Data > Text to Columns, choose Delimited or Fixed width, pick the separator and set any ID column to Text in the last step. Make sure the columns to the right are empty first, because Text to Columns overwrites whatever is next to the data.

How do you convert a text file to Excel on a Mac?

Recent Microsoft 365 versions of Excel for Mac include Data > Get Data (Power Query), which works much like the Windows import. Older versions use an import option under the File menu with the same delimited or fixed-width wizard. Menu names vary by version, so the browser converter in Method 1 is the simplest route on a Mac.

Can you do it without Excel installed?

Yes. These free options all produce a real .xlsx file:

  • Google Sheets: File > Import > Upload, choose the separator type (detect automatically, tab, comma or custom), then File > Download > Microsoft Excel (.xlsx). Untick the option that converts text to numbers and dates if you need IDs kept as typed. Google explains the options in Import data sets and spreadsheets. The file is uploaded to your Google Drive.
  • LibreOffice Calc: open the .txt file and a Text Import dialog appears with separator options and a column type for each column. Then use Save As and pick the Excel 2007-365 (.xlsx) format.
  • Python: with pandas and openpyxl installed, pd.read_csv("data.txt", sep="\t", dtype=str).to_excel("data.xlsx", index=False) converts a tab-separated file and keeps every value as text.

How do you keep leading zeros and long numbers?

Excel treats anything that looks like a number as a number. That turns 02134 into 2134 and phone numbers into scientific notation. Excel also stores only 15 significant digits, so longer IDs lose their last digits for good.

  • Set ZIP, phone, account and ID columns to Text during import (Method 2 or 3). Fixing the format afterwards does not bring dropped zeros back.
  • Do not double-click a CSV that holds codes. Excel applies General format to every column when it opens a CSV that way.
  • For dates, pick the right date order (for example DMY or MDY) in the wizard so 03/04 is not read as the wrong month.

What if the text file is too big for Excel?

A worksheet holds 1,048,576 rows and 16,384 columns, according to Microsoft’s Excel specifications and limits. Anything beyond that is cut off when you open the file. Convert the text to CSV first, then cut it into sheet-sized parts with our CSV splitter, or load it through Power Query into the Data Model instead of a sheet.

Why it matters that the file stays on your device

Text exports often hold customer names, emails, phone numbers or payroll lines. Our converter runs entirely in your browser, using your own computer to do the work, so the file is never uploaded to LeadCanal or anyone else and nothing is stored. It also checks the file type before opening it and refuses files it is not built for. Upload-based converters receive a copy of your file, which is a poor fit for contact lists or financial data.

Troubleshooting: common problems and fixes

Problem Likely cause Fix
Everything is in column A Wrong or missing delimiter Re-import and choose the correct separator, or run the file through the converter
Accents show as é or ? Encoding read as ANSI Set File Origin to UTF-8, or keep “Excel friendly” ticked in the converter
Zeros missing from ZIPs and IDs Columns imported as General Set those columns to Text during import
Long numbers end in 000 or show E+ 15-digit precision limit Import as Text
Values split in the wrong place Commas inside unquoted values Use the converter, which quotes those values
Rows stop at 1,048,576 Worksheet row limit Split the CSV into parts first
Decimals turn into dates or text Comma vs dot decimal settings Use Advanced in the wizard, or the semicolon CSV option

What to do with the spreadsheet next

Once the data is in columns you can sort, filter and dedupe it. If the text was really a pile of emails rather than a table, pull them out with the email extractor first. If you are starting from a PDF statement instead of a .txt, the bank statement to Excel converter is the better tool. For a deeper look at the CSV step itself, see our guide on converting TXT to CSV in Excel, Sheets and Python, and when a list needs fixing at scale, our data cleansing team can take it on.

Frequently asked questions

How to convert a text file to Excel for free?

Use the free browser-based TXT to CSV tool, open the CSV in Excel and save it as .xlsx. Google Sheets and LibreOffice Calc are also free and export .xlsx directly.

Can I just rename a .txt file to .xlsx?

No. An .xlsx file is a zipped set of XML files, not plain text. Excel will warn that the format and extension do not match. Renaming to .csv only works if the text is already comma separated.

How do I convert a text file to Excel with columns?

Tell Excel which character separates the columns: tab, comma, semicolon, pipe or fixed width. Data > From Text/CSV, the Text Import Wizard and our converter all let you pick it.

How do I convert a Notepad file to Excel?

A Notepad file is a plain .txt file, so any method here works. Check the separator in Notepad first, then import it or run it through the converter.

Why does Excel put all my text in one column?

Excel did not recognise the separator. This is common with tab, pipe or semicolon files opened by double-clicking. Re-import and choose the delimiter yourself.

Can I convert several text files to Excel at once?

Our converter accepts several files in one go and returns the CSVs in a zip. For hundreds of files, a short Python loop with pandas is quicker.

Is it safe to convert a text file online?

It depends on the tool. Upload-based sites receive a copy of your file. Our converter works locally in your browser, so the data never leaves your device.

Conclusion: key takeaways

If you remember one thing about how to convert a text file to Excel, it comes down to choosing the right separator and protecting the columns Excel likes to change. Start with the free TXT to CSV converter for speed and privacy, and browse our other free file tools for the next step.

  • Find the separator first: tab, comma, semicolon, pipe or fixed width.
  • Our free converter turns TXT into an Excel-ready CSV in your browser, with no upload.
  • In Excel, Data > From Text/CSV imports the file and lets you set column types.
  • Set ZIP codes, phones and IDs to Text on import so leading zeros survive.
  • Split files over 1,048,576 rows before opening them in a worksheet.

Key takeaways

Text file to Excel, step by step

1 Find the separator first: tab, comma, semicolon, pipe or fixed width.
2 Our free converter turns TXT into an Excel-ready CSV in your browser, with no upload.
3 In Excel, Data > From Text/CSV imports the file and lets you set column types.
4 Set ZIP codes, phones and IDs to Text on import so leading zeros survive.
5 Split files over 1,048,576 rows before opening them in a worksheet.

Editorial policy

We write these guides from the work we do every day: importing, cleaning and exporting contact files for clients. Each method was checked against current software behaviour before publishing, and we update the guide when Excel, Google Sheets or our tools change. We do not accept payment to recommend any product.

Content transparency

This guide was researched with keyword and search data and checked against Microsoft and Google’s official documentation. LeadCanal built and offers the free TXT to CSV converter and the other tools mentioned here. They run in your browser and need no sign-up.

About the author

Written by the LeadCanal team. We build verified B2B lead lists, enrich CRM data and run cold email infrastructure every day, which means we spend a lot of time turning messy text exports into clean spreadsheets. We built our free converters to make that part of the job faster for everyone.

Found this useful? Share it with your team.

Written by LeadCanal

The LeadCanal team builds verified B2B lists and runs cold email infrastructure for agencies and sales teams. Every guide comes from campaigns we send every day.

Done-for-you lead generation

Want this done for you?

Targeted lists and cold email campaigns that book qualified meetings.