Skip to content

Base64 Encoder/Decoder

Encode and decode Base64 as you type: text, files, URL-safe and JWT strings, and data URIs. Runs in your browser.

v2026.10.04

13 chars
Base6413 bytes → 20 chars(+54%)
3 bytes → 4 characters, 6 bits each
H 72e 101l 108
010010000110010101101100
SGVs

First group shown; every 3 bytes work the same way.

Runs locally in your browser: your text and files never leave your device. Drop a file anywhere on the two boxes.

How this works: Method,

How this works

Method

Text is encoded as UTF-8 and every 3 bytes become 4 characters from the 64-character Base64 alphabet, with = padding at the end; URL-safe swaps + and / for - and _ and drops the padding, and wrap breaks lines at 76 characters. Decoding accepts data: URLs, spaces, URL-safe characters and missing padding, and shows text when the bytes are valid UTF-8, otherwise a file named by its first bytes.

Privacy

On your device. Nothing you enter or open leaves this browser. About privacy labels

Changes

  • Redesigned: URL-safe and line-wrap options, decoded images, PDFs and other files to preview or download, and a view of how 3 bytes become 4 characters.
  • Fixed encoding of uploaded binary files, which now use the file’s exact bytes.
  • Converts as you type, with no button to press.
  • First published.

Every change on What’s new

How we make toolsReport a mistake

Frequently Asked Questions

What is Base64 encoding?

Base64 is a method of encoding binary data into ASCII text format. It's commonly used to transmit data over systems that only support text, such as embedding images in HTML or CSS, or sending attachments in email.

Is Base64 encoding secure?

No, Base64 is NOT a security feature. It's simply an encoding scheme, not encryption. Anyone can decode Base64 text back to its original form. Never use it to hide sensitive information.

When should I use Base64 encoding?

Common use cases include: embedding images in HTML/CSS, encoding binary data for JSON APIs, storing complex data in URLs, and transmitting files through text-only systems.

Why does Base64 increase file size?

Base64 encoding increases the size of data by approximately 33% because it represents every 3 bytes of binary data as 4 ASCII characters.

Can I encode images and files?

Yes! This tool supports file uploads. When you upload a file in encode mode, its contents are loaded into the input box and encoded live.