Encode and Decode Base64 Online

Free Online Base64 Encoder Decoder

Free online base64 encoder decoder. Paste text or add a text file, select Encode or Decode, then copy the Base64 result or download it as a file.

Encoding tools by OnlinePCApps since 2013

No upload Encode and decode Copy or download Free
0
Bytes uploaded
64
Character alphabet
0
Files stored
$0
Free, always
Why use Base64

Online Base64 Encoder Decoder for Tokens, Headers and Payloads

Some systems carry only plain text, yet the data to move is binary or full of odd characters. The free online base64 encoder decoder packs it into safe text and unpacks it again.

Move Binary Through Text

Email, JSON and many APIs were built for text, not raw bytes. Base64 turns data into safe characters that pass through those channels intact. The tool makes that string from pasted text or a text file, then decodes it back.

Binary that survives a text channel.

Build a Header or Config Value

A Basic Auth header, a config entry or a small payload often needs a Base64 string. Type the text, select Encode to Base64 and copy the result straight into the header or file. No script is needed for a quick job.

A string ready for a header or config.

Inspect an Encoded String

A token, a config value or part of an API response often arrives as Base64. Decoding it with the online base64 encoder decoder shows the plain text inside, which helps when debugging a payload.

The plain text behind the string.
How it works

Online Base64 Encoder Decoder in Three Steps

1

Paste Text or Add a File

Paste text into the Source Content panel above, or select Upload to add a .txt, .b64, .json, .js, .md, .csv or .xml file. A file can also be dropped on the panel, and its text appears there.

TEXT BASE64 encode
2

Select Encode or Decode

Set Mode to Encode to turn text into Base64, or to Decode to turn a Base64 string back into plain text. Then select Encode to Base64 or Decode Base64 to run the online base64 encoder decoder.

SGVsbG8=
3

Copy or Download the Result

Select Copy Result to send the output to the clipboard, or Download File to save it. Select Edit / Process Another to return to the input, or Reset All to clear everything and start over.

Encode or decode Copy or download
Text files Paste or upload
One input One result per run
Need it faster?

Desktop Base64 Encoder Decoder for Large Files

The online base64 encoder decoder handles one input per run. A huge file or a folder inside a build fits the base64 command or the desktop edition better.

Get Desktop Version Free trial · Windows 7 to 11
What the free tool does

What the Online Base64 Encoder Decoder Does

To encode is to rewrite bytes as safe text, and to decode is to turn them back. The online base64 encoder decoder does both from one panel.

Encode and Decode Both Ways

Text is encoded into a Base64 string, and a Base64 string is decoded back to plain text. A Mode menu switches the same panel between Encode and Decode, so one tool covers the round trip.

Paste Text or Add a Text File

Type or paste text, or select Upload to add a .txt, .b64, .json, .js, .md, .csv or .xml file. The tool takes text only, so images, PDFs and other binary files are not supported.

Standard Base64 Only

The output uses the standard alphabet, with plus and slash. There is no URL-safe option and no padding setting. For a JWT or a web address, swap plus and slash for minus and underscore by hand.

Copy, Download or Start Over

Copy Result sends the output to the clipboard. Download File saves it as a .b64.txt file after Encode and a .txt file after Decode. Edit / Process Another returns to the input and Reset All clears everything.

To encode Base64, to decode Base64 and to turn text into a Base64 string all name one task. A search for base64 encoder or base64 decoder lands on the online base64 encoder decoder above.

Reference

Online Base64 Encoder Decoder Results, Case by Case

Base64 rewrites bytes as safe text and turns them back. The cases below show what the tool does and where it stops.

The caseResultWhat happens and why
Alphabet64 charactersA to Z, a to z, 0 to 9 with plus and slash, the set defined by RFC 4648.
Standard outputplus and slashThe output uses the standard alphabet only.
URL-safe variantnot on this pageThere is no URL-safe option. For a URL or a filename, swap plus for minus and slash for underscore by hand.
Padding= signsA short last block ends in one or two equals signs under RFC 4648. There is no setting to keep or trim them.
Sizeabout +33%The encoded text is roughly a third larger, four characters for every three bytes.
Text inputpaste or filePaste text, or select Upload to add a .txt, .b64, .json, .js, .md, .csv or .xml file.
Binary filesnot supportedImages, PDFs and other binary files fall outside the accepted list. Use the base64 command for those.
Data URInot on this pageNo data URI prefix is added. Type the prefix by hand when a string must embed in CSS or HTML.
Decode outputplain textDecode returns plain readable text and Download File saves a .txt file. Check any binary result before trusting it.
Not encryptionreversibleBase64 hides nothing, since anyone can decode it. It is encoding, not security.
Round tripcheck itEncode a sample, paste the result and select Decode to confirm a match. Try accents or emoji on a short line first.
Bad inputmessage shownAn empty panel shows Please enter text or upload a file first. A failed run shows an error message and no output.
Big inputcheck itSize limits are not stated on this page. Test a large input first, and use the base64 command for huge files.
Where it runson the deviceThe data is encoded in the browser, so nothing is uploaded.

How Base64 Works

Base64 is a way of writing binary data using only 64 printable characters. It takes three bytes at a time. That is twenty-four bits, and it splits them into four groups of six bits, with every group mapped to one character from the alphabet A to Z, a to z, 0 to 9, plus and slash. Where the input does not divide evenly, one or two equals signs pad the end. This is why the encoded text runs about a third larger than the original, four characters for every three bytes. RFC 4648 sets the rules and also defines a URL-safe variant, though the online base64 encoder decoder gives the standard alphabet only. One honest point matters above the rest. Base64 is encoding, not encryption. It hides nothing, because anyone can decode it back with no key, so it carries data through a text channel and never protects a secret. The references below define the standard.

Honest comparison

Online Base64 Encoder Decoder vs the Command Line

Both encode and decode Base64. The trade is real, and a token is often a secret.

Point of comparison This tool Online encoder decoder In the browser The command line A local terminal tool
Where the data goes Stays on the device Stays on the machine
Price and caps Free with no sign-up Free tier often capped
A huge file Check the size limit Streams from disk
Pipe into a script A paste at a time here Part of an automated build
Nothing to set up Open the page and paste A terminal and its flags

The command line wins for a huge file or a step inside an automated build, where the base64 utility fits a pipeline. The online base64 encoder decoder wins for a quick encode or decode with a preview and nothing to install. Online file tools and whether yours uploads goes deeper on where a pasted token goes.

Why no upload

Online Base64 Encoder Decoder Privacy and Data Handling

The text or the file is encoded and decoded inside the browser with plain JavaScript, so the work is client-side and the data stays on the machine that opened it. No copy is passed to a server for the job.

A Base64 string often carries a token, a key or a config value never meant for an outside server. A hosted encoder has to upload the input to process it, and since Base64 is reversible, that exposes whatever the string holds.

1. Open the browser tools at the Network tab
2. Clear the log and let it record
3. Encode or decode with the panel above
→ Nothing uploads. The data was encoded on the page itself.
0
Bytes uploaded
0
Files stored
0
Accounts required
0
Watermarks added
Alternatives

Online Base64 Encoder Decoder Alternatives

All of these encode or decode Base64. They differ in effort, in cost and in setup.

The base64 Command

base64 encodes or decodes a file from the terminal.
It ships with macOS and Linux and scripts a batch.
Limit: Needs the terminal and shows no preview.

In Code

A one-liner encodes in Python, Node, PHP or most languages.
It fits straight into a program or a build.
Limit: A coding step, not a quick paste.

Hosted Encoders

Many sites encode after an upload to a server.
They handle both directions in one place.
Limit: Check where a token or key goes first.

A Spreadsheet or Editor

A built-in function encodes a cell or a snippet.
It suits a one-off inside a document.
Limit: Rarely handles a file cleanly.

The command line and a code one-liner both encode Base64, yet both need a terminal or a program. The online base64 encoder decoder above encodes and decodes with a preview and nothing to set up.

Before encoding

Three Things to Know Before Using an Online Base64 Encoder Decoder

Keep these in mind for a clean result.

It Is Not Encryption

Base64 hides nothing, since anyone can decode it back with no key. Treat the output as open to anyone who sees it. For real protection, encrypt the data first.

Standard Alphabet Only

The tool gives standard Base64, with plus and slash. Those two characters break in a web address, a filename or a JWT, so swap them for minus and underscore by hand when the string goes there.

It Grows the Size

Base64 adds about a third to the size, four characters for every three bytes. That is fine for a small asset or a token, but a large file is usually better sent as a raw attachment than an inline string.

The desktop edition

Desktop Base64 Encoder Decoder for Build Pipelines

The online base64 encoder decoder handles one input per run, which suits an everyday paste. A huge file, or a folder of assets encoded inside an automated build, belongs on the base64 command or the desktop edition.

In a browser taba paste at a time
On the desktopan entire build in one pass
Entire Folders

Point it at a folder of assets and every one is encoded to Base64 or a data URI in a single run, saved beside the source.

Huge Files

A file of hundreds of megabytes is streamed from disk and encoded, past what a browser tab keeps in memory at once.

Build Steps

A saved step encodes assets into a bundle as part of a build, ready for a repeated pipeline with no manual paste.

Common questions

Online Base64 Encoder Decoder Questions

Paste text into the Source Content panel, or select Upload to add a text file. Set Mode to Encode or Decode, then select Encode to Base64 or Decode Base64. The output shows below with a Copy Result and a Download File button. To compare two outputs, use the online text diff.
Leave Mode on Encode, paste your text and select Encode to Base64. The Base64 string appears in an output panel, ready to copy. Select Edit / Process Another to edit the input and run it again.
No. The encoding and decoding run in plain JavaScript in the browser, so the input never leaves the device. This matters for Base64. A string often holds a token or a key, and Base64 is reversible by anyone who has it.
Set Mode to Decode, paste the string and select Decode Base64. The plain text appears in the Decoded Output panel. If your string came from a token or a header, copy only the Base64 part. To pull that part out of a log first, use the online regex tester.
No. Base64 is encoding, not encryption. It hides nothing, because anyone can decode it back with no key. It is a way to carry data safely through a text channel, and never a way to protect a secret. Encrypt the data first if it needs protecting.
No. It gives standard Base64 with plus and slash. For a JWT, a web address or a filename, swap plus for minus and slash for underscore. Drop the equals signs too if your system expects it. To percent-encode an entire link instead, use the online URL encoder decoder.
Not on this page. Upload accepts .txt, .b64, .json, .js, .md, .csv and .xml files, so images and other binary files are out. No data URI prefix is added either. For an image, run the base64 command in a terminal, then add the data:image/png;base64, prefix to your string by hand.
Decode returns plain readable text and Download File saves it as a .txt file, as the note under the panel says. A string that holds an image or a PDF will not come back as that file here. Use the base64 command with a decode flag for binary files.
Test a short sample first. The page does not state how text is prepared before it is encoded, so encode a line with your accents or emoji, paste the result back and select Decode Base64 to check that it matches. If it does not, cross-check with the base64 command.
They are padding. Base64 works in blocks of three bytes, and when the last block is short, one or two equals signs fill it out so the length is a multiple of four. The online base64 encoder decoder has no setting to trim them, so remove them by hand if your system expects an unpadded string.
Base64 uses four characters for every three bytes, so the output runs about a third larger than the input. That is the cost of writing binary as safe text, and it is why a large file is often better sent raw than as an inline Base64 string.
It carries binary through channels built for text. Common uses are embedding an image as a data URI, putting binary in JSON or XML, email attachments through MIME, a Basic Auth header and the parts of a JWT. It is about transport, not security.
Yes, a text file. Select Upload on the panel, or drop a .txt, .b64, .json, .js, .md, .csv or .xml file on it. The text appears in the panel, and the download is named after your file, like notes-out.b64.txt for Encode. To turn a CSV export into JSON first, use the online CSV to JSON converter.
A decode fails when the string is not valid Base64, often from a stray space, a missing character or a URL-safe string with minus and underscore. A line break can cause it too, and CRLF vs LF and the two bytes that break things explains where those come from. Trim the string, restore plus and slash, then select Decode Base64 again.
For plain text, Encode and Decode are a reversible pair under RFC 4648, so the output decodes back to your input. Test your own sample to be sure, since the page does not state how it treats non-ASCII text. Compare the two with the online text diff, or check files byte for byte with the online hash generator.
Text saved in the wrong encoding arrives broken, so the same string looks different on two machines. Fix the encoding first, then run the online base64 encoder decoder. Character encoding explained and why text arrives broken explains why it happens. For a JSON payload, tidy it with the online JSON formatter before you encode.
Yes. It runs in a mobile browser as well as on a desktop, so text on your phone encodes and decodes without an app. Paste the string, select Encode to Base64 or Decode Base64 and copy the result.
Hosting the page costs almost nothing, and because the work runs on the device nothing is received or stored here. The wider suite of tools is what supports the site. This one sets no cap, no watermark and no sign-up.

OnlinePCApps Developer Group

Written and reviewed by Aaron Feld, who has worked on encoding and developer tools here since 2013

Last reviewed October 2026
13
Years on dev tools
0
Bytes uploaded
64
Character alphabet
0
Watermarks

The most common misread of Base64 is that it protects data, and the honest picture is the opposite. Base64 is encoding, not encryption. It rewrites bytes as sixty-four safe characters so they travel through a channel built for text, and anyone with the string can decode it back with no key at all. That makes it handy for moving data through email or putting binary in JSON, and useless for hiding a secret. The other point worth stating is scope. The online base64 encoder decoder gives standard Base64 for pasted text or a text file, with Copy and Download buttons. It has no URL-safe option, no data URI prefix and no support for images or other binary files, so those jobs go to the base64 command or a code one-liner. Test a short sample with accents or emoji first and decode it back to confirm it matches. Everything follows RFC 4648.

Standards followed

Base64 · RFC 4648 MIME · RFC 2045 Alphabet · Standard Encoding · not encryption
Built on the same shared design system as every OnlinePCApps tool. onlinepcapps.com

Encode and Decode Base64 Online for Free

No sign-up needed. Paste text into the online base64 encoder decoder, then select Encode or Decode.

Encode or Decode Free, no account Try Desktop Edition For large files and builds
Encode or Decode