Skip to content

Base64 workbench

Base64 Encoder

Encode text to Base64 online: UTF-8 and legacy charsets, URL-safe output, PEM/MIME line wrapping, per-line mode and overhead stats. Free, instant and 100% private — nothing is uploaded.

100% private · everything runs in your browser
Options
0 chars

Base64

—

Waiting for input…

Recent inputs— stored only in this browser
Going the other way? Open the Base64 Decoder — auto-detects the charset with reasons, shows hex, previews images, audio, video and PDFs.Encoding a file instead of text? Open File to Base64 — drag any file in, get raw Base64 or a ready-made data URI, with type detection and a hex view.

How to use

Base64 Encoder, step by step

  1. 01

    Type or paste text — the Base64 appears live as you type, with exact size, overhead and timing stats below.

  2. 02

    Pick from 91 character sets (Unicode, every Windows/ISO legacy set, GBK, Big5, Japanese, Korean, even EBCDIC), switch on URL-safe, strip padding, wrap at 64/76 or a custom width, or encode each line separately.

  3. 03

    Copy or download the result, and revisit earlier inputs under “Recent inputs” — stored only in this browser, never on a server. Encoding a whole file? The dedicated File to Base64 tool handles that.

FAQ

Frequently asked questions

Yes. The encoder runs 100% in your browser — your input is never uploaded, logged or sent anywhere. You can verify it yourself: disconnect from the internet and the encoder keeps working.

Base64 packs 3 bytes of data into 4 characters, so the output is always about 33% larger than the raw input (plus a character or two of padding). The status bar shows the exact overhead for every conversion.

Standard Base64 uses "+" and "/" — two characters with special meanings in URLs. URL-safe Base64 (RFC 4648 §5) replaces them with "-" and "_" so the result can be used in URLs, filenames and JWTs. Padding ("=") is often stripped too — the "omit padding" option does exactly that.

44 in total: UTF-8, UTF-16 and UTF-32 (both byte orders), every WHATWG single-byte legacy set (Windows-1250 through 1258, ISO-8859-1 through 16, KOI8-R/U, Mac Roman and more), five CJK encodings (GBK, Big5, EUC-JP, Shift_JIS, EUC-KR) and four EBCDIC IBM mainframe code pages. More than any competing Base64 site.

Base64 encodes bytes, not characters — so text must first be turned into bytes using a character set. UTF-8 covers almost everything, but legacy data is often Latin-1, Windows-1252 or UTF-16. The decoder page auto-detects the charset when you convert back.

Normally line breaks are encoded like any other character. With this option every line is treated as an independent entry — line 1 encodes to its own Base64 value, line 2 to its own, and so on. This is the mode you want for lists of values, CSV exports or log files.

A data URI embeds a file directly in a URL: data:image/png;base64,… — handy for inline images in HTML, CSS or email templates. The dedicated File to Base64 tool emits the full data URI for any file, ready to paste.

Use the File to Base64 tool — drag any file in (images, PDFs, audio, video, archives) and get raw Base64 or a ready-made data URI, with file-type detection, dimensions and a hex view. Like this page it runs entirely in your browser, with no size limit beyond your device memory.

No. Base64 is an encoding, not encryption — anyone can decode it instantly. Never use it to protect secrets; use proper encryption instead.

Related tools

esc

Tools

Pages

↑↓ navigate↵ open⌘K

Keyboard shortcuts

Same shortcuts everywhere — ⌘ on macOS, Ctrl on Windows and Linux.