Tab-Separated Values (TSV) Converter
Convert TSV or delimiter-separated rows into clean tables and typed exports with header detection, row warnings, and column profiles.TSV Conversion
| # | {{ header }} | Copy |
|---|---|---|
| {{ row.index }} | {{ cell }} | |
| No rows to display. |
| Column | Key | Type | Non-empty | Null | Empty | Unique | Sample value | Copy |
|---|---|---|---|---|---|---|---|---|
| {{ profile.index }}. {{ profile.label }} | {{ profile.key }} | {{ profile.type || 'empty' }} | {{ profile.nonEmpty.toLocaleString() }} | {{ profile.nullCount.toLocaleString() }} | {{ profile.emptyCount.toLocaleString() }} | {{ profile.unique.toLocaleString() }} | {{ profile.sample || '—' }} | |
| No columns profiled yet. | ||||||||
{{ sqlInsertText }}
{{ xmlText }}
{{ htmlTable }}
{{ markdownTable }}
{{ csvText }}
Introduction
Tab-separated values sit in a practical space between a spreadsheet and a plain text file. Each line represents a record, and a tab character marks the break between fields. That simple shape makes TSV useful for copying tables out of spreadsheets, moving datasets between tools, preparing imports for databases, and reviewing small exports in a text editor without needing a proprietary workbook format.
The same simplicity also creates easy-to-miss failure points. A table can look aligned in a spreadsheet while the text underneath has missing cells, extra separators, blank rows, duplicate headings, or values that should stay as text even though they look numeric. Order IDs such as 00124, postal codes, account references, and part numbers are common examples: changing them into numbers may make the converted data cleaner to a machine but wrong for the person who has to match the record later.
Delimiter-separated text is not one uniform format. TSV normally uses tabs, CSV uses commas, and many exports use semicolons, pipes, spaces, or a custom separator because the data already contains the usual character. Quoting rules add another concern: a quoted field may need to carry a separator, a quote mark, or a line break as data instead of letting that character split the row.
| Format choice | Why people use it | Common mistake |
|---|---|---|
| TSV | Readable table exchange when text contains many commas. | Assuming field values can safely contain tabs. |
| CSV | Broad spreadsheet and import support. | Forgetting quote rules around commas, quotes, and line breaks. |
| Pipe or semicolon | Exports from logs, regional spreadsheets, and database tools. | Leaving automatic detection to guess from a small or irregular sample. |
A reliable conversion is not only a change of file extension. It is a check that rows still line up, headers still mean what they said in the source, blank values have the intended meaning, and typed values will not surprise the next system that reads them.
How to Use This Tool:
Start with the table shape, then choose how much interpretation should happen during conversion.
- Paste rows into TSV content or use Browse TSV for a
.tsvor.txtfile. If the input area shows no results, check that the file was saved as plain text rather than a spreadsheet workbook. - Set Delimiter. Use Tab for normal TSV, Auto detect for unknown delimiter-separated text, or Custom when the separator is an unusual string such as
::. - Choose Quote character and Escape handling when fields may contain separators, quote marks, or line breaks. If a parse error says the text ended inside quotes, the source has an unmatched quote or the wrong quote option is selected.
- Set Header row. Automatic detection is useful for exploration, but choose Use first row or Treat all as data when you already know what the first line means.
- Open Advanced before exporting structured data. Review Trim fields, Skip empty rows, Detect data types, Detect dates, and Empty as null so identifiers, blanks, booleans, numbers, and ISO-like dates are represented the way your destination expects.
- If headers are present, use Column naming to adjust display labels and record keys. Resolve blank, duplicate, or awkward names before relying on JSON records, JSON Lines, SQL inserts, or XML tags.
- Read TSV Data Table, Column Profile, and any warning badges before downloading or copying an export. Row-length warnings and generated names are signs to inspect the source text rather than treating the export as finished.
Interpreting Results:
TSV Data Table is the first confidence check. It shows the parsed row order, visible column labels, and row values after delimiter, quote, trimming, blank-row, and header settings have been applied. A table that looks shifted usually means the selected delimiter or quote rule does not match the source.
Column Profile helps catch type and completeness problems before the data is reused. Compare the dominant type, non-empty count, null count, empty count, unique count, and sample value for each column. A supposedly numeric column with text samples, or an identifier column marked numeric, deserves review before import.
- Trust warnings about irregular row lengths, duplicate names, and missing headers more than the visual alignment of the original paste.
- Use JSON arrays when field names are not reliable; use JSON records, JSON Lines, SQL, or XML only after the header names are stable.
- Do not treat spreadsheet-friendly output as spreadsheet-safe output. Cells beginning with formula characters still need destination controls when opened in spreadsheet software.
Technical Details:
Delimited text conversion starts with record boundaries and field boundaries. A line break usually ends a record, and the selected delimiter separates fields inside that record. Quoting changes that rule by allowing separators and line breaks to appear as cell content. When quote handling is wrong, a single character can move every following field into the wrong column.
TSV has a stricter traditional reading than many real-world files follow. The IANA registration describes tab-separated records with a header line, tab-separated fields, constant field counts, and no tab characters inside field values. Spreadsheet exports, pasted tables, and log files often bend those expectations by using optional headers, quoted fields, alternate delimiters, blank rows, or mixed value types, so conversion needs both parsing and review.
Transformation Core:
| Stage | Mechanism | Review point |
|---|---|---|
| Line normalization | Windows, Unix, and classic Mac line endings are treated as record breaks. | Confirm the text did not lose the final row during copy or file save. |
| Delimiter resolution | Explicit modes use the chosen separator; automatic mode samples early rows and favors the candidate with stable field counts. | Override automatic detection when a short sample could fit more than one separator. |
| Quoted field parsing | Double quote, single quote, or no quote mode controls whether delimiters and line breaks can appear inside a field. | Fix unmatched quotes before trusting any following rows. |
| Row width alignment | The widest parsed row sets the column count; shorter rows are padded with blank cells and reported as warnings. | Investigate rows with fewer fields because they may indicate missing delimiters or broken quoting. |
| Header decision | The first row can be forced as headers, forced as data, or scored using uniqueness, common label words, and type contrast against sample rows. | Use an explicit header choice when the first row contains real data that looks label-like. |
| Typed value conversion | When enabled, recognized numbers, true/false and yes/no values, null markers, blanks, and ISO-like dates can become typed values for structured outputs. | Keep codes with leading zeroes, mixed IDs, and text-like dates as strings when exact text matters. |
Header names carry two jobs: they label the table for people and become field names for structured formats. Duplicate, blank, or punctuation-heavy names are adjusted so downstream formats have usable fields. SQL identifiers are normalized and quoted, while XML names must be valid element names. These changes help produce readable output, but they do not replace a schema review for a production database or API.
Value and Export Semantics:
| Choice | Effect | Risk to check |
|---|---|---|
| Trim fields | Leading and trailing spaces are removed before display and typed conversion. | Spaces that are meaningful in fixed codes or labels may be lost. |
| Detect data types | Numbers, booleans, null markers, and optionally dates can appear as typed values in structured output. | Identifiers, postal codes, and part numbers can be mistaken for numbers. |
| Empty as null | Blank cells can become null when type detection is active. | Null means missing value, while an empty string may mean deliberately blank text. |
| JSON arrays | Rows are represented by position, so stable headers are not required. | Consumers must know which column position means which field. |
| Record-style outputs | JSON records, JSON Lines, SQL inserts, and XML rows use field names derived from headers or overrides. | Header mistakes become key, column, or tag mistakes downstream. |
A useful mental model is source text -> parsed rows -> reviewed columns -> destination format. In a clean case, name[TAB]city[TAB]score followed by Ada[TAB]London[TAB]98 becomes three fields named name, city, and score, with score optionally represented as the number 98. If the city field contains an embedded tab without quoting, the same row becomes four fields and every export after that point reflects the shifted structure.
Formula injection is a separate spreadsheet concern. CSV and spreadsheet exports can preserve cell text that begins with characters such as =, +, -, or @. When converted data includes untrusted user input and will be opened by people in spreadsheet software, sanitize or constrain those cells in the destination workflow instead of assuming conversion alone makes them safe.
Worked Examples:
A copied contact list starts with name, email, and plan, followed by customer rows. With Delimiter set to Tab and Header row set to automatic or Use first row, TSV Data Table should show the first customer as row 1 and Column Profile should show three labeled columns. JSON records are appropriate after the header names are confirmed.
A log export uses pipes because messages often contain tabs and commas. Choose Pipe, keep quote handling enabled, and inspect TSV Data Table for message rows that contain embedded separators. If a row-length warning appears, check the original log line for a missing quote or an unescaped separator inside the message.
An order dataset includes values such as 00124 and 00125. If Detect data types turns that column into numeric-looking output, disable type detection before exporting or keep that field as text in the destination. The Column Profile sample value is the quick check: it should still show the leading zero when that zero is part of the identifier.
A one-row file containing only Ada[TAB]London[TAB]98 may not have headers. Set Header row to Treat all as data when those are values, or use Column naming to assign names before choosing JSON Lines, SQL, XML, or JSON records.
FAQ:
Why did automatic detection choose the wrong delimiter?
Automatic detection samples early rows and scores candidate separators by field count stability. Short, sparse, or irregular input can look valid under more than one separator, so choose Tab, Comma, Semicolon, Pipe, Space, or Custom directly when the preview looks shifted.
Why are some rows filled with blank cells?
The parser aligns rows to the widest row so missing fields are visible instead of silently hidden. Read the row-length warning and inspect that source line for a missing value, extra separator, or quote problem.
Why are JSON Lines, SQL, and JSON records disabled without headers?
Record-style formats need field names. Set Header row to Use first row when the first line contains labels, or assign names in Column naming after a header is available.
Does date detection change every date-like value?
No. Date detection is tied to type detection and normalizes ISO-like date strings when they can be read safely. Ambiguous dates such as 03/04/2026 should be reviewed or kept as text because day-month order depends on context.
Does pasted TSV data leave the browser?
Parsing, profiling, copying, and most downloads are produced in the browser. Creating an XLSX download may require the browser to fetch a spreadsheet export library, but the table data is assembled locally on the page.
Glossary:
- Delimiter
- The character or short string that separates fields inside a row.
- Record
- One logical row of data, usually represented by one line of delimited text.
- Header row
- The row used to name fields rather than being treated as data.
- Quoted field
- A field wrapped in quote characters so a separator or line break can be part of the value.
- Type detection
- The choice to represent recognized text values as numbers, booleans, nulls, or dates in structured output.
- Column profile
- A per-column summary of type, completeness, uniqueness, and sample values.
References:
- text/tab-separated-values, IANA Media Types registry.
- TSV, Tab-Separated Values, Library of Congress, last updated May 9, 2024.
- RFC 4180: Common Format and MIME Type for Comma-Separated Values (CSV) Files, RFC Editor, October 2005.
- CSV Injection, OWASP Foundation.