Input and output
Example: `hello` encodes to `aGVsbG8=`.
Advertisement
Paste text, encode it to Base64, and copy the result. This tool is designed for practical workflows like preparing data for APIs, configuration files, and test fixtures. The conversion runs locally in your browser so your input never needs to leave your device.
Base64 is a way to represent bytes using a limited alphabet (letters, numbers, +, and /, with optional = padding). It is often used when you need to move data through systems that are not friendly to raw bytes or special characters. That includes JSON fields that must be ASCII-safe, HTTP headers, URL parameters in controlled settings, and legacy protocols.
The key point is that Base64 does not hide content. Anyone can decode it. If you are working with sensitive material, protect it with real security controls (transport encryption, access control, and proper secret management). Base64 is best thought of as a compatibility layer that makes data easier to transmit, store, and compare across environments.
Browser APIs like btoa were originally designed around Latin-1 strings, which becomes a problem the moment your text includes emoji, accents, or non-Latin scripts. This page avoids that trap by converting your input into UTF-8 bytes first, then Base64 encoding those bytes. That is the “Unicode-safe” part.
Under the hood, the conversion follows a simple, deterministic pipeline:
Because the algorithm is byte-based, it behaves well with mixed text like “Résumé ✅”, Arabic, Japanese, or multi-line notes. You do not need to pre-normalize your text just to encode it. If you upload a file, extraction happens in your browser as well (PDF and DOCX extraction require optional libraries in your app).
Very large inputs can exceed browser memory limits or hit Base64 API constraints. If encoding fails, try a smaller chunk of text, or split the job into multiple runs and combine the results where appropriate for your system.
After encoding, you can copy the Base64 output directly or download it as a PDF. Copy is explicit: you click Copy, then paste wherever you need the string. That helps avoid the “did the app reformat my content on paste?” problem in strict fields like JSON editors, form inputs, and configuration panels.
Base64 output is often long. Many systems wrap it across lines for readability, but some systems require a single unbroken line. This page keeps your output exactly as produced, without inserting line breaks. If your destination expects wrapped Base64 (for example, MIME-style line lengths), do that wrapping explicitly with a tool designed for that specific format.
Newlines are treated as real characters. If you copy text from an editor that adds trailing newlines, your Base64 will include them. If you want a “single line” input, remove extra line breaks before encoding.
Standard Base64 may end with one or two = characters. That padding is normal and helps decoders recover the original byte length. Do not strip padding unless your destination explicitly uses a padding-free variant.
This page encodes text to Base64. It does not encrypt, compress, or “sanitize” content. It also does not guess your target format (URL-safe Base64, MIME wrapping, or custom alphabets). If you need a specialized variant, use a dedicated encoder for that standard.
You will sometimes see “URL-safe Base64” mentioned in API docs. Standard Base64 uses + and / characters, which can be inconvenient inside URLs or filenames. URL-safe variants swap those characters (usually to - and _) and may remove padding. This page outputs standard Base64 because it is the most widely accepted and the safest default for copy-and-paste workflows.
If your destination explicitly requires the URL-safe alphabet, you can convert the output with a simple deterministic change: replace + with - and / with _. Some systems also expect padding to be removed. Only do that if your target spec says so, because many decoders still rely on padding for strict validation.
Another common surprise is that Base64 makes strings longer. The encoded output is typically about one third larger than the original byte length. That is normal: the encoding trades compactness for compatibility. If you are hitting field limits, consider whether your system supports binary uploads, gzip compression before encoding, or passing a reference instead of embedding the full content.
Encoding is computed from the editor value in your browser. This page does not upload your text or store it on the server. If you choose to upload a file, it is read locally in your browser tab, and the extracted text is encoded locally as well.
Advertisement
Quick answers about Base64 encoding, Unicode, files, and downloads.
Using this tool
Convert the entered UTF-8 text into a Base64 representation.
Example: `hello` encodes to `aGVsbG8=`.
Base64 is a reversible text encoding, not encryption or a privacy boundary.
The decoder reports invalid input rather than treating malformed Base64 as successful output.
Conversion is performed in the browser. Copying or downloading happens only when you choose those actions.
Advertisement
A few related projects that pair well with this tool. Fast, focused, and privacy-friendly.
Translate text to Morse instantly, hear audio beeps, and learn patterns step by step. Fun learning for all ages.
Explore the origins, history, and evolution of words and phrases from myths, languages, and cultures.
Generate and play printable word search puzzles instantly. Great for classrooms, kids, and casual fun.