What is Base64 Encoder/Decoder?
Base64 Encoder/Decoder converts text to Base64 encoding and back instantly. Base64 is commonly used to embed images in HTML/CSS, encode email attachments, transmit binary data as text, and handle API authentication tokens — all processed privately on your device.
Encoding uses standard Base64 (RFC 4648): three input bytes become four output ASCII characters from the A-Z, a-z, 0-9, +, / alphabet, with = padding. The tool handles UTF-8 text correctly (multibyte characters survive the round trip) and also accepts files up to 5 MB, returning a data: URI you can paste straight into HTML, CSS, or JSON.
How to use
- Paste or type your plain text in the input area to encode it to Base64, or paste a Base64 string to decode it.
- Toggle between Encode and Decode mode using the direction switch.
- Copy the result with one click — ready to paste into code, emails, or configuration files.
When to use
- Inspecting a Basic Auth header by decoding the user:pass token after the space.
- Embedding a small icon or font directly into HTML or CSS as a data URI.
- Wrapping binary data (signatures, certificates, image bytes) so it survives JSON or YAML.
Result
Encode 'Hello, World!' → 'SGVsbG8sIFdvcmxkIQ==' for embedding in a JSON payload. Decode 'dXNlcjpwYXNz' → 'user:pass' to inspect a Basic Auth header.
FAQ
- Why is my encoded output longer than the input?
- Base64 turns three bytes into four ASCII characters, so the output is about 33% larger. A 300 KB image becomes roughly 400 KB of text plus the data URI prefix. That's the trade-off for text-safe transport.
- Is Base64 a form of encryption or compression?
- Neither. It's an encoding scheme — anyone can decode it instantly without a key. Use it to make binary data text-safe, not to hide secrets. The output is also slightly bigger than the input, never smaller.
- Why does decoding fail with 'invalid Base64'?
- Usually a missing or extra character: stripped padding (= signs), URL-safe variants (- and _ instead of + and /), or a stray newline. Re-copy the full string including any trailing = and try again.
- Can I encode a binary file like a PNG or PDF?
- Yes. Upload through the file picker — files up to 5 MB are read as bytes and emitted as a data URI (data:image/png;base64,...) you can paste into an <img> tag or a CSS background-image rule.
- Does the output work the same as Python or Node base64?
- Yes for standard Base64. Python's base64.b64encode and Node's Buffer.from(str).toString('base64') return the same output. If your target needs URL-safe variants, swap + → - and / → _ afterwards.
Related Tools
Rhyme Finder
Find perfect and near rhymes for any word
Anagram Solver
Find all valid anagrams of any word
Unicode Lookup
Search Unicode by name or code
URL Encoder/Decoder
Encode and decode URLs instantly
NATO Phonetic Alphabet
Convert text to NATO phonetic alphabet
Paragraph Counter
Count paragraphs in your text