Base64 Encoder / Decoder — Both Ways, Instantly

Encode any text to Base64, or decode Base64 back to readable text. Handles UTF-8 correctly, so emoji and accented characters survive the round trip.

100%Free
0Signup Required
0Data Leaves Browser

Base64 Encoder / Decoder

Free • No Signup
Live — results update as you type

Quick Answer

A Base64 encoder turns any text into the Base64 alphabet (A-Z a-z 0-9 + / =) so it can travel through systems that only handle plain ASCII — email attachments, data URIs, and some API payloads. A decoder reverses the process. This tool does both, with correct UTF-8 handling.

What This Tool Does

Choose Encode to convert text to Base64, or Decode to convert Base64 back to text. The encoding is UTF-8 aware: multibyte characters (emoji, CJK, accents) are encoded correctly rather than mangled, and decoding validates the input so garbage Base64 produces a friendly error instead of gibberish. You can also upload files, switch character sets, use the URL-safe Base64URL variant, or remove padding.

Key Features

  • Two-way — encode and decode in the same tool via a dropdown.
  • UTF-8 safe — emoji and accented letters round-trip perfectly.
  • Character set options — UTF-8, ASCII, Latin-1, Windows-1252, UTF-16LE, or auto-detect.
  • Base64URL support — the URL-safe variant used in JWTs and OAuth tokens.
  • Padding control — strip or add the trailing = signs.
  • Decode each line separately — handle multiple independent Base64 entries at once.
  • File upload — encode any file to Base64 (e.g. images as data URIs) or decode a .b64 file back to binary.
  • Friendly errors — invalid Base64 is rejected with a clear message.
  • Instant — results update as you type.

How to Use the Base64 Encoder / Decoder

  1. Pick Encode to Base64 or Decode from Base64.
  2. Paste your text or Base64 string — or click Upload File to work with a file.
  3. Set the character set, and tick URL-safe or Without padding if you need those variants.
  4. Read the result on the right, then Copy, Download, or Save decoded file.

Use Cases

  • Embedding a small image as a data: URI in HTML or CSS.
  • Decoding tokens or payloads that you need to inspect quickly.
  • Passing binary-ish data through a plain-text channel.

Tips

  • Base64 is not encryption — anyone can decode it. Never use it to protect sensitive data.
  • Base64 adds about 33% to size; use it only when a channel requires it.
  • If decoding fails, check for stray whitespace or line breaks in the input.

Privacy

Encoding and decoding happen locally. Your data never leaves the browser.

Conclusion

Base64 is everywhere — in tokens, emails, and data URIs. Encode and decode it in one click, correctly, for free.

FAQ

Frequently Asked Questions About Base64 Encoder / Decoder

No. Base64 is an encoding — it makes binary data representable as ASCII but provides zero secrecy. Anyone who sees the Base64 can decode it.

Yes. The tool encodes and decodes as UTF-8, so emoji, accented characters and non-Latin scripts survive the round trip intact.

The input may not be valid Base64, or it may have been created from a different character encoding. Try removing stray whitespace and line breaks first.

Yes. Click Upload File to encode any local file to Base64 (great for images as data: URIs), or upload a .b64 file in Decode mode to save the decoded binary via Save decoded file. Everything stays in your browser.

Base64URL is the URL-safe variant used in JWTs and OAuth tokens: + becomes -, / becomes _, and padding = signs are usually removed. Tick URL-safe to use it — the decoder accepts it automatically.

That is padding. Base64 works in 3-byte blocks, and = fills the final block when the input length isn't a multiple of three. Tick Without padding to strip them.

More Tools

Code Faster, Not Harder

Format, minify, test and generate — free developer utilities that run entirely in your browser.