Base64-encode a TSV
Encode an entire TSV file as Base64 text. The point is transport: Base64 has no tabs, no newlines, and no characters that a JSON string, a YAML value, an environment variable, a URL, or an email header will mangle — so a file that would be destroyed by any of those channels survives intact. Decode it with Base64 → TSV.
How to use
- Paste or drop the file. The whole thing is encoded as one blob, not per row.
- Tick wrap lines to break the output at 76 characters — required by MIME, and easier to paste into a diff or a config file.
- Copy or download.
What Base64 is and isn't
It is an encoding: it makes binary or awkward text safe for a text-only channel, at a cost of about 33% size. It is not encryption or obfuscation — anyone can decode it in one step, and it protects nothing. Never Base64 a file containing personal data and treat it as anonymised; anonymize is the tool for that, and even it is pseudonymisation rather than anonymisation.
UTF-8 is handled correctly, so non-ASCII text (accents, CJK, emoji) round-trips exactly. Encoding is done on the UTF-8 bytes of the text, which is the convention every decoder expects.
When it's actually the right answer
Embedding a small fixture inside a JSON payload or a YAML config, where a raw tab-separated blob would need heavy escaping. Passing a file through a CI environment variable or a Kubernetes secret. Putting a data file in a URL or a QR code. Attaching a file to a system that only accepts text fields. For anything larger than a few hundred kilobytes, the 33% overhead and the unreadability make a real file attachment better.
FAQ
Is this URL-safe Base64?
No — standard Base64, which uses + and /. For URLs you'd need those swapped for - and _; urltoolskit.org has encoders for that variant.
Why 76 characters for wrapping?
The MIME standard (RFC 2045) line length. Many older tools reject longer lines; most modern ones don't care, so leave wrapping off if you want a single-line value.
Does it encode row by row?
No — the whole file becomes one Base64 string. Per-cell encoding would need a different tool and is rarely what anyone means.
Is it safe for binary files?
This page reads its input as text, so a genuinely binary file may not survive. Base64 for binary needs a byte-level reader; use base64 < file on the command line.
Privacy
100% client-side. No upload. See the privacy policy.