Free Online Tool

Base64 Encoder & Decoder

Encode and decode Base64 text or files in your browser. Supports UTF-8, Base64URL, copy and download, with no file uploads to a server.

Encode text or files to Base64, or decode Base64 back again. Everything runs in your browser — files are not uploaded anywhere.

What do you want to do?
Input type
Alphabet

Selected alphabet: A–Z a–z 0–9 + / with = padding.

0 B of 4.77 MB allowed

Your result will appear here after you press Encode.

Base64 represents every 3 bytes as 4 text characters, so encoded output is roughly one-third larger than the original. It is an encoding — not compression and not encryption.

Choose Encode or Decode, then type text or pick a file to begin.

How to use this base64 encoder

Encode text or files to Base64, or decode Base64 back again. Everything runs in your browser — files are not uploaded anywhere.

How to use it: choose Encode or Decode, then Text or File. For text, type or paste directly (up to 5 MB of UTF-8). For files, pick a file up to 5 MB — its size is checked before anything is read. Press Encode or Decode. Small inputs convert as you type; larger ones run in the background without freezing the page. Copy the result or download it — your original input is never changed.

Standard Base64 versus Base64URL: standard Base64 uses A–Z, a–z, 0–9, + and /. Base64URL uses A–Z, a–z, 0–9, - and _ — it replaces + with - and / with _ so encoded text survives safely inside URLs and filenames. Both forms accept padded output (ending in =) and unpadded output. Decoding accepts either, but + and / are rejected in Base64URL mode (and - and _ in standard mode) so mixed alphabets are caught instead of silently mangled.

UTF-8, binary output and limits: text is first converted to UTF-8 bytes, so Hindi, Tamil, accented letters, emoji and newlines all survive the round trip exactly; decoding shows text only when the bytes are valid UTF-8, otherwise it offers a byte download instead of garbled characters. Source files, text input (as UTF-8 bytes) and decoded output are each limited to 5,000,000 bytes (5 MB); file sizes are checked before anything is read and oversized input is rejected with your previous valid result kept. Base64 is encoding, not encryption — anyone can decode it instantly, so never use it to hide passwords or secrets. Nothing is uploaded, stored, logged or shared — closing the tab removes everything.

FAQs

What is the “=” padding for?

Base64 works in groups of 3 bytes → 4 characters. When the input length is not a multiple of 3, one or two “=” characters pad the final group. This tool writes padding by default, accepts input with or without it, and reports missing or misplaced characters in plain language.

Why did decoding fail on text with line breaks?

Strict validation is on by default: spaces and line breaks are rejected so nothing is silently discarded. Turn on “Ignore whitespace” to decode Base64 copied with wrapping (for example from an email), or remove the breaks first.

Does it handle Hindi, Tamil, emoji, and accents?

Yes. Text is encoded as UTF-8 bytes before Base64 conversion, so every Unicode character — Devanagari, Tamil script, accented Latin letters, emoji, newlines — round-trips exactly. Decoding shows text only when the bytes are valid UTF-8.

What are the size limits?

Source files, text input (as UTF-8 bytes), and decoded output are each limited to 5,000,000 bytes (5 MB). File sizes are checked before anything is read; oversized input is rejected with a message and your previous valid result is kept. Pasted Base64 is additionally bounded so whitespace-filled strings cannot consume unbounded memory.

Does my content leave my browser?

No. Encoding and decoding happen entirely on your device (in a Web Worker for large inputs, with a main-thread fallback). Nothing is uploaded, stored, logged, or shared — closing the tab removes everything.

Can I paste a Data URL like data:image/png;base64,…?

A Data URL has a MIME prefix in front of the Base64 payload, so it is not raw Base64 and is rejected here rather than silently mangled. Use the “Use only the part after ;base64,” action to decode just the payload, or paste raw Base64 without the prefix.

Runs entirely in your browser — nothing you type or upload leaves your device.

Keep exploring

Related tools

Word Counter

Count words, characters, sentences and reading time instantly.

Open tool

Case Converter

Convert text between upper, lower, title and sentence case.

Open tool

Slug Generator

Turn any headline into a clean URL-friendly slug.

Open tool

Need something custom? Contact me