TXT to Excel Converter

Turn tab, comma, semicolon or pipe-separated text into a real .xlsx workbook — no import dialog, no format warning, and your leading zeros intact if you want them.

TXT to Excel converter

Convert

Columns
Workbook
Supports: TXTCSVTSV

Nothing is uploaded. This tool runs entirely in your browser, so the file never leaves your device. There is no server to send it to, no copy kept anywhere, and it keeps working if you lose your connection after the page has loaded.

Accepts .txt .csv .tsv You get: An .xlsx file Free, no sign-up

A real workbook, not a renamed text file

The usual advice is to rename the file to .xls and let Excel work it out. Excel does open it, and then complains — "the file format does not match the extension" — every single time, for everyone you send it to. What follows the complaint is worse: your columns go through Excel's import guesser rather than being handed over already decided.

What you get here instead is an actual OOXML package: a workbook part, a worksheet with your cells in it, a style table for the header row, and the content types and relationships that make those pieces a file rather than a folder of XML. Excel, LibreOffice, Numbers and Google Sheets all open it silently, because there is nothing to complain about.

Worked example

Paste this tab-separated text, header row included:

name	role	years
Ada Lovelace	Engineer	12
Smith, John	Editor	7

With detection left on "Detect from my data", the tool counts tabs, commas, semicolons and pipes on every line. Tabs appear exactly twice per line here, so tab wins even though a comma sits inside "Smith, John" — the status line under the preview reports detected delimiter: tab so you can check the guess before trusting it. The workbook comes out as three rows and three columns: the header bolded and frozen, Ada Lovelace and Smith, John as text, and 12 and 7 as real numbers you can sum in a formula.

Finding your columns

Text files rarely say what separates their columns, so the separator is worked out from the text: tab, comma, semicolon and pipe are each counted per line, and the one that appears the same number of times on every line wins. Consistency rather than raw frequency matters, because a paragraph of prose contains plenty of commas but never in a regular pattern.

Anything inside quotes is skipped while counting, so a file of "Smith, John" values separated by tabs is read as tab-separated rather than comma-separated. If the guess is still wrong — one-column files give it nothing to work with — pick the separator yourself from the list.

Leading zeros, and why they vanish

A cell containing 007 can be the number seven or the text "007", and a spreadsheet has to pick. Excel picks the number, which is why employee IDs, postcodes and phone numbers come out of imports mangled — and why a 16-digit card number turns into 1.23457E+15.

Here it picks the other way, and not as an option: a value with a leading zero is written as text every time. Nobody has ever wanted 007 to become 7, and a setting for it just moves the mistake somewhere you have to remember. Values too long to survive as numbers are kept as text for the same reason: Excel keeps only 15 significant digits of a number and silently rounds anything past that, so a 16-digit card or account number written as a number comes back with its last digit wrong. A digit string that long stays text here instead.

What the numbers setting does control is everything else. Leave it on and 12 and -3.5 arrive as numbers ready to sum. Turn it off and every cell in the sheet is text, including those — useful when the file is a record to read rather than arithmetic to do, and when you would rather nothing at all was interpreted.

Dates are left alone

Nothing here tries to recognise a date. 03/04/2025 is written as the text you typed, not as March the fourth or the third of April, because there is no way to tell which you meant and a wrong guess is invisible once made.

If you want real dates, select the column in Excel and convert it there, where the result is in front of you and one undo away. That is a worse experience and a better outcome.

With the header option on, the first row is bolded and frozen, so your column names stay on screen as you scroll through the rows below. It changes how the sheet is displayed and not what it contains — turn it off when your first line is data rather than names, and nothing else about the file changes.

Common mistakes

  • Leaving delimiter detection on for a single-column file. With nothing to count, there is nothing to detect from, and the result may land in one column when you expected several. Pick the separator yourself if you know it.
  • Expecting the sheet name to change the data. It only labels the tab at the bottom of the workbook — Excel limits it to 31 characters, which is why the field is capped the same way.
  • Using Copy instead of Download for a spreadsheet. Copy gives you tab-separated text for pasting into a cell that is already open; it is not a workbook and has none of the header bolding, freezing or number formatting the .xlsx download has.
  • Assuming a mixed column — some rows numeric, some not — sorts correctly. Each cell is judged on its own text, so a column of mostly numbers with one blank or one word in it ends up with numbers and text mixed in the same column, exactly as typed.

Limits and privacy

The parser, the workbook writer and the ZIP container that holds it all run in your browser. This page has no upload endpoint, so a file you drop is read on your own device and its text goes into the box. Nothing is stored and there is no account.

A dropped file is capped at ten megabytes and the grid at roughly two million cells. Beyond that, opening the text file from Excel itself will be quicker than building a workbook inside a browser tab, and will not have to hold the whole thing in memory twice.

Going the other direction — extracting a workbook back into plain delimited text — see CSV to TXT. If the target is a JSON API rather than a spreadsheet, use TXT to JSON instead, which shares this page's leading-zero rule. To only swap the delimiter character without building a workbook, try CSV to TSV.

Frequently asked questions

Is this a real Excel file?

Yes. The download is a genuine .xlsx workbook — a proper OOXML package with a workbook part, a worksheet and a style table — not a text file with the extension changed. Excel opens it without the "the file format does not match the extension" warning, because the format really does match.

Why not just rename my .txt to .xls?

Because Excel notices. It warns on every open, and it hands your columns to its import guesser rather than being told what they are. Anything that looks like a date gets converted to one, and long digit strings become numbers in scientific notation. Writing a real workbook is what stops that.

How does it know where my columns are?

It looks at which separator appears the same number of times on every line — tab, comma, semicolon or pipe. Consistency rather than raw count, because prose contains plenty of commas but not in a regular pattern. You can override the choice if the guess is wrong.

Will my leading zeros survive?

Yes, always, whichever way the numbers option is set. A value with a leading zero is a code rather than a quantity — a postcode, a phone number, an employee ID — so 007 is written as text and stays 007. That is the single most common way an import ruins a file, and it is not a decision worth putting behind a checkbox.

What does the header option do?

It freezes the first row so it stays visible while you scroll, and bolds it. It does not change the data. Turn it off if your first line is a data row rather than column names.

Are dates converted?

No. Dates are written as text exactly as you typed them. Guessing between 03/04 as March the fourth or the third of April is how spreadsheets quietly corrupt data, so this tool does not guess — format them in Excel, where you can see the result.

What does the Copy button give me?

The tab-separated preview shown in the box, which pastes straight into a spreadsheet cell by cell. It is not the workbook — that is the download, and it is the only thing here that is a real .xlsx.

Is my file uploaded?

No. Parsing and workbook writing both happen in your browser. This page has no upload endpoint, and a file you drop is read on your own device.

How large a file can it take?

Ten megabytes of text, and a cap of about two million cells. Past that, opening the text file from Excel directly will be faster than building the workbook in a browser tab.

About this converter

The workbook is written to the OOXML specification and its structure is checked automatically — every required part present, every relationship resolving, every content type declared. It has not been opened in Microsoft Excel itself, because that is not available here. Check the row and column counts under the preview against what you expected before relying on the result, and keep the original file.

CSV to TSV

CSV to TSV and back, with quoting handled properly.

Data Tools

CSV to TXT

CSV to plain text, with the delimiter under your control.

Data Tools

TXT to JSON

A .txt file or plain text into valid JSON.

Text Tools

CSV to vCard

Contacts from a spreadsheet into an importable .vcf file.

Data Tools

More in Data Tools All tools