Encoding
Base64 Encode
Convert text to Base64 with Unicode-safe encoding for emojis, non-English text, and regular ASCII content.
Runs locally in your browser. Your input is not uploaded. Base64 is encoding, not encryption.
How this tool works
Base64 represents binary data using a text-safe alphabet.
This encoder uses browser text encoding before converting bytes to Base64.
Examples
- Encode a short config value for a data URI example.
- Convert Unicode text to Base64 for a local test.
- Encode a small local binary fixture and download or copy the resulting Base64 text.
Common use cases
Encoding text safely
This encoder converts text to bytes with TextEncoder before producing Base64, which avoids the common Unicode problems that happen with ASCII-only approaches.
Use Base64 for representation and transport compatibility, not secrecy. Anyone who can see the encoded text can decode it.
Common Base64 mistakes
- Treating Base64 as encryption.
- Encoding secrets before committing or logging them.
- Forgetting that decoded bytes may represent Unicode text, JSON, or binary data.
- Confusing Base64 with Base64URL used in JWT sections.
Invalid or unsafe assumption
Invalid/failure example
Treating an encoded API key as protected because it no longer looks readable.
Mistakes to avoid
- Calling Base64 encryption.
- Encoding JavaScript UTF-16 code units directly.
- Forgetting that Base64 increases size by roughly one third.
Limits of this workflow
Base64 provides representation, not confidentiality or integrity.
File input is capped to protect memory and responsiveness.
Local-processing and privacy boundary
Text and bounded files are encoded locally; the encoded output is as sensitive as the original bytes.
Practical workflow
- Choose text or a bounded local file.
- Encode bytes with the standard alphabet.
- Round-trip a sample when interoperability matters.
- Protect or redact the output according to the original data sensitivity.
Related guides
Official references
FAQ
Is Base64 encryption?
No. Base64 is an encoding format and can be decoded by anyone.
Does this support Unicode?
Yes. TextEncoder is used so Unicode text is handled correctly.
Does Base64 hide a secret?
No. Anyone can decode Base64 without a key.