Cleanup and output options

You can drop a file onto this box.

    Preview

    Convert TXT to TSV (tab-separated values)

    This converter turns plain text into a clean TSV file you can paste into Excel, Google Sheets, or a database import. It works with comma-separated text, semicolons, pipes, colons, runs of spaces, and fixed-width reports where the columns are lined up with padding. Leave the setting on Detect automatically and it works out how your text is split, then shows the result as a table so you can check every row before you download.

    Quoted values are handled properly, so "Doe, Jane" stays in one cell instead of splitting at the comma, and doubled quotes inside a value come through as a single quote. Everything happens in your browser. Your file is never uploaded.

    How to convert a text file to TSV

    1. Paste your text, drop a file onto the input box, or use Open file.
    2. Check the detected delimiter in the status line. Change it if the preview doesn't look right.
    3. Adjust cleanup options if you need them, like skipping report header lines or comment lines.
    4. Copy the TSV or download it as a .tsv file.

    Fixed-width text and aligned columns

    Reports exported from older systems, command-line tools, and mainframes often line data up with spaces instead of using a delimiter:

    Name        City        Joined
    Jane Doe    Staunton    2024-03-01
    Sam Lee     Richmond    2023-11-15

    Choose Fixed-width columns, or let auto-detect find it, and the tool looks for character positions that are blank on every line and places a column break there. A ruler shows each break over your text. Click the text to add or remove a break, or type the positions directly, which helps when a value like New York has a space that happens to line up across rows. For looser text where columns are simply separated by two or more spaces, use the 2 or more spaces option instead.

    What makes a TSV file valid?

    A TSV file has one record per line and a single tab between each field. Because tabs and line breaks are the structure, the official format doesn't allow either one inside a value. If your text has them, you can choose how to handle it: replace them with a space (the safest choice for spreadsheets), escape them as \t and \n (common for database loaders like PostgreSQL and MySQL), or wrap the cell in quotes, which Excel and Google Sheets understand. Affected cells are highlighted in the preview so nothing changes silently.

    The preview also flags rows with a different number of columns from the rest. That usually points to a missing delimiter, a stray comma, or a quote that was never closed. Turn on Fill short rows with empty cells if you want every row padded to the same width.

    Frequently asked questions

    Is my file uploaded to a server?

    No. The conversion runs entirely in your browser with JavaScript. Nothing is sent anywhere, and you can use the tool offline once the page has loaded.

    How do I keep commas inside a value?

    Wrap the value in double quotes, like "Doe, Jane", and keep Respect quoted values turned on. The comma inside the quotes stays part of the cell. A quote inside a quoted value is written as two quotes, for example "Say ""hi""".

    Why do accented characters look wrong when I open the file in Excel?

    Excel sometimes assumes an older encoding for text files. Turn on Add BOM for Excel under Cleanup and output options before downloading, and Excel will read the file as UTF-8.

    Can I use a regular expression as the delimiter?

    Yes. Choose Custom text or regex and wrap the pattern in slashes, for example /\s{3,}/ for three or more whitespace characters or /\s*;\s*/ for semicolons with optional spaces. Plain text like :: or ~ works too.

    What file types can I open?

    Any plain-text file, including .txt, .csv, .dat, .prn, .psv, and .log, up to 10 MB. UTF-8, UTF-16, and Windows-1252 files are detected automatically, so exports from Excel and older Windows software open with the right characters.

    What's the difference between CSV and TSV?

    CSV separates values with commas, so any value containing a comma has to be quoted. TSV uses tabs, which rarely appear in real data, so most TSV files need no quoting at all. That makes TSV easier to paste into spreadsheets and simpler for scripts to read.

    Related tools: sample TSV files, JSON to TSV, TXT to CSV, pipe to comma CSV, CSV validator, and the Excel-proof CSV toolkit for keeping leading zeros.

    Our Full Text Tool Library

    Flipper File