Base64 represents binary data using 64 safe ASCII characters, so it can travel through systems designed for text — email, JSON, URLs and HTML data URIs.
How to use the Base64 Encoder
- 1 Type or paste the text to encode.
- 2 Choose URL-safe output or MIME line wrapping if you need them.
- 3 Copy the Base64 string.
Formula
Every 3 bytes (24 bits) → 4 characters of 6 bits each Output length = 4 × ⌈bytes ÷ 3⌉ (padded with '=')
Worked examples
Input: Hello, World!
Result: SGVsbG8sIFdvcmxkIQ==
Input: héllo ✓
Result: aMOpbGxvIOKckw==
Encoded as UTF-8 first
Base64 is encoding, not encryption
Anyone can decode Base64 — it offers no secrecy. Never use it to "hide" passwords or secrets.
URL-safe Base64
Standard Base64 uses + and /, which have special meanings in URLs. The URL-safe variant (RFC 4648 §5) replaces them with - and _ and usually omits the = padding. It is used in JWTs and many web APIs.
Size overhead
Base64 output is about 33% larger than the input, because every 3 bytes become 4 characters.
Runs locally
Everything happens in your browser — nothing you paste is uploaded or logged, so it is safe to use with API responses, tokens and internal data.
Frequently asked questions
Why does Base64 end with = or ==?
Padding: when the input length is not a multiple of 3 bytes, = characters fill the final group.
Does this support emoji and non-English text?
Yes. Text is encoded as UTF-8 before Base64, which is the web standard.
How do I decode Base64?
Use the Base64 Decoder tool.
Related tools
JSON Formatter & Validator
Format, beautify, minify and validate JSON with syntax highlighting, key sorting and precise error locations.
Base64 Decoder
Decode Base64 and URL-safe Base64 back to UTF-8 text, with clear errors for invalid input.
URL Encoder / Decoder
Percent-encode or decode URLs and query parameters, as a component or a full URI.
HTML Entity Encoder / Decoder
HTML entity encoder and decoder: escape special characters to entities, or decode named and numeric entities back to text.
Regex Tester
Regex tester for JavaScript regular expressions: live match highlighting, capture groups and replace preview.
Hash Generator
Generate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of text or files, and verify checksums.