What is Base64, and what is it actually for?
Base64 is a way of representing arbitrary binary data — an image, a PDF, any raw bytes — as plain text built only from letters, digits, and three symbols (+, /, =). It exists because a lot of systems were built to safely carry text but not raw binary: email, JSON payloads, URLs, some database fields. Base64 is the standard bridge — it lets binary data travel safely through a text-only channel, at the cost of making it roughly a third larger.
It is not encryption and it is not compression. Anyone can decode Base64 back to the original data instantly with no key or password — it provides zero confidentiality. Treat it purely as a format conversion, never as a way to protect sensitive data.
What can you do with this tool?
- Text → Base64 — encode any text, correctly handling Unicode and emoji via UTF-8 byte encoding first.
- Base64 → Text — decode a Base64 string back to readable text, with a clear error if it isn't actually text.
- File → Base64 — select any file and get its exact byte content back as a Base64 string, ready to paste into JSON, an email, or a config file.
- Base64 → File — paste a Base64 string and download it back as the original file's exact bytes.
When should you use it?
Reach for Base64 encoding when you need to embed binary content somewhere that only accepts text — a data URI in CSS/HTML, a field in a JSON API payload, an email attachment, a value in an environment variable or config file that doesn't support raw binary. Reach for decoding whenever you've been handed a Base64 string and need to see or use what it actually contains.
How it works
Text encoding converts your input to UTF-8 bytes first (via the browser's native TextEncoder), then Base64-encodes those bytes — the step a naive character-by-character implementation skips, which is exactly what corrupts emoji and non-Latin scripts elsewhere. File encoding reads the file's raw bytes directly and Base64-encodes them the same way, so the output round-trips back to the exact original file, byte for byte.
Limitations
- Base64 output is roughly 33% larger than the original input — this is inherent to the format, not a bug.
- Very large files (hundreds of MB) may be slow to encode in the browser, since the whole file is processed in memory.
- Base64 provides no encryption or compression — don't use it as a substitute for either.
Privacy
Encoding and decoding happen entirely in your browser — no file or text you enter here is uploaded to a server.
