| Internet-Draft | MTSV | December 2026 |
| Ra | Expires 5 June 2027 | [Page] |
This document defines Multi-Sheet Tab-Separated Values (MTSV), a text format that carries a sequence of sheets of tab-separated values in a single file. MTSV is TSV with one additional dimension: sheets are separated by the ASCII form feed (FF) character. A TSV file that is encoded in UTF-8, and that contains no NUL, no FF, and no CR other than in CRLF line breaks, is an MTSV file. This document also records the registration of the text/prs.mtsv media type.¶
This note is to be removed before publishing as an RFC.¶
Status information for this document may be found at https://datatracker.ietf.org/doc/draft-demosra-mtsv/.¶
Source for this draft and an issue tracker can be found at https://github.com/demos-ra/mtsv-spec.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 5 June 2027.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document.¶
The tab-separated values format [TSV] encodes one set of records per file. Fields are separated by a tab, and records are separated by line breaks.¶
Both separators are ASCII format effectors [RFC20]. HT moves "to the next in a series of predetermined positions along the printing line", and LF moves "to the next printing line". MTSV adds FF, the format effector for the next larger unit, which moves "to the first pre-determined printing line on the next form or page". Tab gives the next field, line feed gives the next record, and form feed gives the next sheet.¶
MTSV keeps the separators and structure of TSV, and adds only one separator, FF, and a name for each sheet.¶
MTSV does not carry over these restrictions of the TSV grammar:¶
This document does not define data types, formulas, formatting, cell references, or metadata. Conversion to and from spreadsheet formats such as [ODF] and [OOXML] is also out of scope.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
The grammar in this document uses ABNF [RFC5234], including its core rules HTAB, LF, and CRLF.¶
In examples, <TAB> denotes the tab character (%x09), as in [TSV],
and <FF> denotes the form feed character (%x0C). Line breaks are
shown as line breaks; every line shown, including the last, ends with a
line break.¶
This document uses the following terms:¶
The first record of a sheet, which contains the name of each field, as defined in [TSV].¶
A header followed by zero or more records, or no lines at all (an empty sheet). The term matches the corresponding structure in [OOXML].¶
The text that follows an FF on the same line. The first sheet of a file can be written without its FF line; its sheet name is then empty.¶
An implementation that writes MTSV files.¶
An implementation that reads MTSV files.¶
A field is text. A record is an ordered sequence of fields. A sheet is a header and an ordered sequence of zero or more records. Every record in a sheet has as many fields as the header of that sheet. A sheet with no lines is an empty sheet; it has neither a header nor records.¶
An MTSV file is an ordered sequence of sheets. The order of the sheets is the order in which they appear in the file.¶
Every sheet has a sheet name. An empty sheet name is permitted. Sheet names are not required to be unique.¶
The lines before the first FF, if there are any, form the first sheet, written without its FF line; its sheet name is empty. If there are no lines before the first FF, the first sheet is the sheet that begins with the first FF. A file with no lines has no sheets.¶
A TSV file that is encoded in UTF-8, and that contains no NUL, no FF, and no CR other than in CRLF line breaks, is an MTSV file that consists of exactly one sheet, whose sheet name is empty.¶
An MTSV file is encoded in UTF-8 [RFC3629]. The grammar below is expressed in terms of characters after decoding.¶
MTSV uses three separators, all of which are ASCII format effectors [RFC20]:¶
| Separator | Character | Separates | Source |
|---|---|---|---|
| tab | HT (%x09) | fields | [TSV] |
| line break | LF (%x0A) or CRLF (%x0D.0A) | records | [TSV], [CSVW] |
| form feed | FF (%x0C) | sheets | [RFC20] |
An FF appears only at the start of a line.¶
A sheet name is written on the line that begins with an FF, directly after the FF, and ends at the line break. A sheet name follows the same rules as a field: it cannot contain NUL, HT, LF, FF, or CR.¶
mtsv-file = [first-sheet] *named-sheet
first-sheet = header *record
named-sheet = FF sheet-name eol sheet-body
sheet-body = [header *record]
header = record
record = field *(HTAB field) eol
field = *field-char
sheet-name = *field-char
field-char = %x01-08 / %x0B / %x0E-10FFFF
; any character except NUL, HTAB, LF, FF, and CR
FF = %x0C
eol = LF / CRLF
¶
In addition to matching the grammar, each record in a sheet MUST have the same number of fields as the header of that sheet, as required by [TSV].¶
A line that contains no characters before its line break is a record that consists of one empty field. It is not an empty sheet; an empty sheet has no lines (Section 3).¶
An MTSV parser MUST accept every MTSV file that conforms to Section 4.¶
A parser MUST treat the lines before the first FF, if any, as the first sheet, with an empty sheet name, and each line that begins with an FF as the start of a new sheet.¶
A parser MUST accept both LF and CRLF as line breaks, consistent with the default line terminators in [CSVW].¶
A parser SHOULD treat a U+FEFF character at the start of a file as an encoding signature and not as part of the first field, consistent with Section 6 of [RFC3629].¶
A parser MAY accept input that does not conform to this document.¶
An implementation MAY set limits on the size of files, the number of sheets, records, and fields, and the length of fields and sheet names, consistent with Section 9 of [RFC8259].¶
An MTSV generator MUST produce MTSV files that conform to Section 4.¶
A generator MUST end every record with a line break.¶
A generator MUST write an FF line before every sheet, including the first, so that generated files can be concatenated (Section 8).¶
A field or sheet name that contains NUL, HT, LF, FF, or CR cannot be represented in MTSV, as with fields that contain a tab in [TSV]. A generator MUST NOT write such a value. How a generator handles such values is out of scope.¶
The first sheets of the examples in Section 7.1 and Section 7.3 are written without an FF line. A generator writes an FF line before every sheet (Section 6).¶
This is the example from [TSV]. It is both a TSV file and an MTSV file with one sheet, whose sheet name is empty.¶
Name<TAB>Age<TAB>Address Paul<TAB>23<TAB>1115 W Franklin Bessy the Cow<TAB>5<TAB>Big Farm Way Zeke<TAB>45<TAB>W Main St¶
This MTSV file contains two sheets, named "People" and "Animals".¶
<FF>People Name<TAB>Age<TAB>Address Paul<TAB>23<TAB>1115 W Franklin Zeke<TAB>45<TAB>W Main St <FF>Animals Name<TAB>Age<TAB>Address Bessy the Cow<TAB>5<TAB>Big Farm Way¶
This MTSV file contains a first sheet with an empty sheet name, an empty sheet named "Empty", and a sheet named "Animals".¶
Name<TAB>Age Paul<TAB>23 <FF>Empty <FF>Animals Name<TAB>Age Bessy the Cow<TAB>5¶
Section 3 states which TSV files are MTSV files. This section describes how common text processing affects MTSV files.¶
MTSV gives structure to four characters: HT, LF, FF, and CR. These characters also have other standard properties, and text processing that acts on those properties can change the structure of an MTSV file:¶
FF has the mandatory break class in [UAX14]. An application that supports only TSV can present a line that begins with an FF either as a record whose first field begins with FF, or as an empty line followed by a line that contains the sheet name.¶
HT, LF, FF, and CR have the White_Space property in [UCD]. Trimming whitespace from a line can remove an FF, which turns a sheet name into a record, or remove an HT at either end of a line, which removes empty fields. Splitting a line on runs of whitespace removes empty fields and splits fields that contain spaces.¶
Replacing HT with spaces removes the field structure, as it does for [TSV].¶
FF is a control character. Applications that remove or reject control characters remove sheet boundaries. [XML] does not permit FF or the other C0 control characters except HT, LF, and CR, so an MTSV file cannot be carried as XML 1.0 character data without an additional encoding. A field or sheet name that contains such a character cannot be represented in [ODF] or [OOXML] without an additional encoding. The XML Characters and Unicode Assignables subsets of [RFC9839] also exclude FF. In MTSV, FF is a protocol element, as RS (%x1E) is in [RFC7464]; a protocol that restricts text to one of those subsets needs an additional encoding to carry an MTSV file.¶
Converting between LF and CRLF does not change the structure of an MTSV file (Section 5). Converting line breaks to CR alone produces a file that does not conform to this document.¶
Concatenating MTSV files produces an MTSV file that contains the sheets of each file, in order, only if each non-empty file ends with a line break and each non-empty file after the first begins with an FF. Otherwise, the first sheet of a later file becomes part of the last sheet of the file before it. Files written by a generator begin with an FF (Section 6).¶
Printing and Unicode normalization do not change the structure of an MTSV file.¶
Conversion to a character encoding other than UTF-8 produces a file that does not conform to this document (Section 4.1).¶
Spreadsheet applications apply their own rules to sheet names, such as uniqueness and length, and to data types and sizes. These rules are outside the scope of this document.¶
IANA registered the text/prs.mtsv media type in the personal tree on 2026-10-22, according to Section 3.3 of [RFC6838], with draft-demosra-mtsv-01 as the published specification. IANA is requested to update the registration to the template below, which uses the template in Section 5.6 of [RFC6838], and to replace the reference to draft-demosra-mtsv-01 with a reference to RFCXXXX.¶
Note to the RFC Editor: Please replace RFCXXXX with the number assigned to this document, and remove this note.¶
text¶
prs.mtsv¶
N/A¶
N/A. The charset parameter is not used, and no default charset is defined. MTSV files are encoded in UTF-8 (Section 4.1); this states how the charset is determined, as Section 3 of [RFC6657] requires.¶
binary. Fields and sheet names have no maximum length, so lines can exceed the 998 octets that Section 2.8 of [RFC2045] permits for 8bit data. As per Section 4.1.1 of [RFC2046], this media type uses CRLF to denote line breaks in transport. Implementations need to be aware that files often use LF alone.¶
See Section 11.¶
RFCXXXX¶
Applications that store or exchange multiple sheets of tabular data as text.¶
N/A¶
Demos Ra (demos_ra@hotmail.com)¶
COMMON¶
N/A¶
Demos Ra¶
Demos Ra¶
This section collects the internationalization decisions of this document, as Section 6 of [RFC2277] recommends.¶
HT, LF, CRLF, and FF are protocol elements. Fields and sheet names are text (Section 3), as Section 2 of [RFC2277] requires a protocol to distinguish.¶
The charset of an MTSV file is UTF-8 (Section 4.1). This identifies the charset of all text in the file and uses UTF-8, as Section 3.1 of [RFC2277] requires.¶
Sheet names are internationalized. A sheet name is text and follows the same rules as a field (Section 3); it is not a US-ASCII identifier. Section 2 of [RFC2277] requires a document to state this.¶
MTSV carries no language information. This document leaves language to the enclosing protocol or to separate metadata such as [CSVW], which Section 2 of [RFC2277] permits where the responsibility belongs to another layer.¶
MTSV files are text and contain no executable content. [TSV] lists no security considerations.¶
Applications that import MTSV files into spreadsheets can interpret fields that begin with characters such as "=", "+", "-", or "@" as formulas. Such applications need to treat imported fields as data.¶
Sheet names can contain control characters. Applications that display sheet names need to take care that such characters do not mislead users.¶
MTSV does not permit NUL (Section 4). A parser that accepts NUL as non-conforming input (Section 5) needs to process it without truncating the field or sheet name that contains it, as truncation at NUL can misalign fields or lose data in implementations that use NUL-terminated strings.¶
Parsers that do not set limits (Section 5) can exhaust resources when reading large files or files with very many sheets.¶
This section is to be removed before publishing as an RFC.¶
Required UTF-8 and removed the charset parameter and its default, as Section 3 of RFC 6657 specifies for new text subtypes. Stated that conversion to another character encoding produces a non-conforming file. Changed the encoding considerations from 8bit to binary. Excluded NUL from fields and sheet names, and added a security consideration for parsers that accept NUL. Changed the grammar so that a first sheet without an FF line has at least one line, as the data model states, and a file with no lines has no sheets. Stated that an empty line is a record of one empty field. Noted that two examples omit the first FF line. Stated that XML 1.0, ODF, and OOXML cannot carry C0 control characters other than HT, LF, and CR without an additional encoding, and added RFC 9839 and RFC 7464 to the Interoperability Considerations. Recorded the registration of text/prs.mtsv, requested an update of the registration and its reference, and removed a sentence that followed the registration template. Changed the submission type to independent. Used versioned references for UAX #14 and the UCD.¶
Gave every sheet a sheet name: the lines before the first FF form a first sheet whose sheet name is empty, and the term "unnamed sheet" is removed. Required generators to write an FF line before every sheet, and removed the rule on a first field that begins with U+FEFF, which that requirement makes unnecessary. Used "N/A" in the registration template, as Section 5.6 of RFC 6838 asks.¶
Replaces draft-demos-ra-mtsv-00, renamed so that the author component contains no hyphen. Replaced the byte order mark rules with a parser rule that follows Section 6 of RFC 3629, and stated that a first field that begins with U+FEFF cannot be represented. Removed the rule on a final record without a line break, which the rule on non-conforming input already covers. Cited CSVW as the source of LF and CRLF line breaks. Added an Internationalization Considerations section, and placed the IANA, Internationalization, and Security Considerations sections in the order that Section 4 of RFC 7322 recommends.¶
Initial version.¶