Base64 to TSV Converter
Decode Base64-encoded data to TSV format instantly. Supports file upload, URL-safe Base64, live preview table, and one-click download.
About
Base64 encoding inflates payload size by approximately 33% due to its 6-bit to 8-bit mapping ratio (3 source bytes become 4 ASCII characters). When your pipeline delivers TSV data wrapped in Base64 - common in email attachments (MIME), REST API responses with binary-safe transport, or database BLOB exports - a decoding error silently corrupts every downstream record. This tool performs real atob() decoding with proper UTF-8 reconstruction via TextDecoder, handles both standard (RFC 4648 ยง4) and URL-safe (RFC 4648 ยง5) alphabets, and validates structural integrity before output. It approximates correctness assuming well-formed Base64 input with valid padding. Malformed padding or truncated streams will produce explicit error diagnostics rather than silent garbage.
Tab-separated values use U+0009 (horizontal tab) as the field delimiter, which avoids the quoting complexity of CSV when fields contain commas. However, embedded tabs or newlines within fields will break column alignment. This converter renders a live preview table so you can visually verify column integrity before downloading. Pro tip: if your source system uses \t escape sequences literally (two characters) instead of actual tab bytes, the preview will reveal misalignment immediately.
Formulas
Base64 maps every group of 3 input bytes (24 bits) to 4 printable ASCII characters (6 bits each). The encoded length for n input bytes is:
Conversely, decoding recovers the original byte count:
where Lencoded = length of the Base64 string (excluding whitespace), p = number of padding characters (0, 1, or 2), and โโ denotes the ceiling function.
URL-safe Base64 substitution rules:
The converter detects URL-safe encoding by scanning for - or _ characters and normalizes them before calling atob().
Reference Data
| Base64 Character | Decimal Value | Binary | Notes |
|---|---|---|---|
| A - Z | 0 - 25 | 000000 - 011001 | Uppercase Latin |
| a - z | 26 - 51 | 011010 - 110011 | Lowercase Latin |
| 0-9 | 52 - 61 | 110100 - 111101 | Digits |
| + | 62 | 111110 | Standard alphabet (RFC 4648 ยง4) |
| / | 63 | 111111 | Standard alphabet (RFC 4648 ยง4) |
| - | 62 | 111110 | URL-safe variant (RFC 4648 ยง5) |
| _ | 63 | 111111 | URL-safe variant (RFC 4648 ยง5) |
| = | - | - | Padding character |
| Encoding Overhead | |||
| Size Ratio | 43 ≈ 1.333ร original size (33.3% overhead) | ||
| 1 byte input | 4 Base64 chars (2 padding =) | ||
| 2 bytes input | 4 Base64 chars (1 padding =) | ||
| 3 bytes input | 4 Base64 chars (0 padding) | ||
| TSV Specifications | |||
| Delimiter | U+0009 Horizontal Tab (HT) | ||
| Row Separator | U+000A (LF) or U+000D U+000A (CRLF) | ||
| MIME Type | text/tab-separated-values | ||
| File Extension | .tsv | ||
| Encoding | UTF-8 (recommended), ASCII compatible | ||
| Quoting | Not defined by spec (unlike CSV RFC 4180) | ||
| Max Columns | No formal limit; practical limit depends on consumer | ||
| IANA Registration | Registered as text/tab-separated-values | ||
| Common Sources | Spreadsheet exports, bioinformatics (BED, GFF), database dumps | ||
Frequently Asked Questions
TextDecoder with the fatal option disabled, which inserts the Unicode replacement character U+FFFD for invalid sequences. If you see these, the original data was likely encoded in a different charset (e.g., ISO-8859-1, Shift-JIS) or the Base64 wraps binary content (images, compressed archives) rather than text.atob() should handle wrapped input.