Developer tool · Free & no sign-up

Base64 Encoder / Decoder

Encode text or files to Base64, or decode Base64 back to readable text — with full UTF-8 support and a one-click copy button.

Advertisement

The file is read locally in your browser and never uploaded.

Advertisement

About this tool

Base64 encodes arbitrary bytes as a printable 64-character alphabet (A–Z, a–z, 0–9, + and /, padded with =), defined in RFC 4648. It exists because much internet infrastructure only safely carries plain ASCII text: email attachments, data URIs in CSS, JWT segments and API payloads all rely on Base64 to tunnel binary data through text channels. This tool encodes and decodes text and files entirely in your browser.

How to use it: choose Encode or Decode. In Encode mode type text — or pick a file up to 200 KB — and it converts instantly; in Decode mode paste a Base64 string and get the original text back. Use the copy button to grab the result, and note that the tool reports the output’s byte and character counts so you can sanity-check size expectations.

Worked example: encoding namaste, seotoolbuzz! produces bmFtYXN0ZSwgc2VvdG9vbGJ1enoh — twenty-eight printable characters replacing fourteen bytes. Decoding that string returns the original exactly. UTF-8 text round-trips perfectly: नमस्ते encodes to a longer but fully lossless representation, and decoding restores it byte-for-byte, unlike naïve Latin-1 implementations that corrupt non-ASCII characters.

Common mistakes: treating Base64 as encryption (it is an encoding — anyone can reverse it instantly); pasting Base64URL (JWT-style, with - and _ instead of + and /) into a standard decoder without translating the alphabet; ignoring padding errors — the input length must be a multiple of 4 after whitespace removal; and decoding to a binary file you then open as text, producing unreadable bytes rather than an error.

File encoding in the browser: files are read with FileReader as raw bytes and converted without ever touching a network socket — safe for confidential documents up to 200 KB, which is the page’s hard cap. For larger artefacts, use a local CLI like base64 on Linux/macOS or certutil -encode on Windows rather than pasting megabytes into any web page, including this one.

Questions readers ask

Q1Is Base64 encryption?
No. Base64 is a lossless encoding with zero confidentiality — anyone can reverse it in one step. Never use it to protect passwords, keys or personal data.
Q2Does this work with Hindi or emoji text?
Yes. Input is encoded as UTF-8 bytes before conversion, so any Unicode text round-trips perfectly. Decoded needs the same assumption — this tool always assumes UTF-8 output.
Q3Can I encode a file?
Yes, in Encode mode — up to 200 KB, read locally in your browser via FileReader. Larger files are rejected before reading to keep the page responsive.
Q4What is Base64URL and why do some strings look different?
RFC 4648 §5 swaps + and / for - and _ and drops padding, making tokens safe in URLs and headers. Decoding a Base64URL string here requires translating - and _ back to + and / first — JWT segments need that treatment.
Q5Why do I get “Invalid Base64 input”?
The string contains characters outside the alphabet, or its length is not a multiple of 4 after whitespace removal. Check for stray quotes, line breaks, or a truncated copy.
Q6Is my data uploaded anywhere?
No. Encoding and decoding run 100% client-side. The file picker never transmits; the page works fully offline once loaded.
Advertisement