Skip to content

Free tool

Base64 Encoder & Decoder

Convert text to Base64 and back, or turn a file into a data URI. Everything stays on your device.

Runs entirely in your browser. Nothing you enter is sent to a server.

Text

File to data URI

Drop a file here, or press Enter to choose oneUp to 10 MB. The file stays on your device.

How it works

Base64 represents binary data using 64 printable characters, so it can travel through systems that only handle text. Every 3 bytes become 4 characters, which makes the output about one third larger.

For text, the tool encodes your input to UTF-8 bytes with TextEncoder and converts those bytes, and the reverse when decoding, so non-English text and emoji round-trip correctly. For files, it reads the bytes and builds a data: URI with the file’s MIME type.

Common uses

  • Inspecting the payload of a token, header or email attachment.
  • Embedding a small image or font directly in CSS or HTML as a data URI.
  • Sending binary data inside JSON or XML.
  • Decoding a Base64 string from a log to see what it contains.

Frequently asked questions

Is Base64 encryption?

No. Base64 is an encoding, not encryption. Anyone can decode it instantly, so never use it to hide passwords or secrets.

Why does it handle emoji and accents correctly?

Text is first converted to UTF-8 bytes with TextEncoder and then encoded, instead of using the older btoa on raw characters, which fails on anything outside Latin-1.

What is URL-safe Base64?

The standard alphabet uses + and /, which have special meaning in URLs. The URL-safe variant swaps them for - and _ and usually drops the = padding. Tick the option to produce it; the decoder accepts both forms.

Is my file uploaded?

No. Files are read in your browser with the FileReader API and never leave your device. Large files are limited to 10 MB here because the result has to fit in page memory.

All free tools

Need something built?

Turn this into a real product with Soch Tech

These tools are free to use. If you need custom software, a database or a secure application, tell us what you are working on.