FlipMyFormat

Base64 Encode & Decode

Encode text to Base64 or decode it back — fully Unicode-safe, with an optional URL-safe variant for tokens and query strings. Instant, accurate, and completely private. Copy or download the result.

100% Free Unicode-safe URL-safe variant Encode & decode Data never sent

Your data is processed on your device and never sent to any server.

People Also Use

Everything This Tool Does

Accurate, Unicode-safe Base64 both ways.

Encode & decode

Switch between converting text to Base64 and Base64 back to text in one click.

Unicode-safe

Emoji, accents and non-Latin scripts encode and decode perfectly via UTF-8.

URL-safe variant

Produce URL-safe Base64 (- and _ instead of + and /, no padding) for tokens and query strings.

Instant results

Output updates live as you type — no button press or waiting.

One-click swap

Send the output back to the input and flip the mode to reverse a conversion instantly.

Clear errors

Invalid Base64 gets a helpful message instead of silent, wrong output.

Character count

See the length of the result so you know how big your encoded string is.

Whitespace tolerant

Line breaks and spaces in pasted Base64 are ignored so decoding just works.

Copy or save

Copy the result to your clipboard or download it as a text file.

Fully private

Everything runs in your browser — your text is never uploaded to any server.

Examples

See Base64 in both directions.

Encoding text

Text in

Hello, world!

Base64 out

SGVsbG8sIHdvcmxkIQ==

URL-safe variant

Standard

ab+/cd==

URL-safe

ab-_cd

Modes

Encode/decode

Unicode

UTF-8 safe

Variant

URL-safe

Speed

Instant

Export

Copy & save

Privacy

Never sent

FlipMyFormat vs Other Base64 Tools

An honest look at how this free tool compares.

FeatureFlipMyFormatOthers
Data never sent to a serverSometimes
Unicode / UTF-8 safeLimited
URL-safe variantRare
Encode and decode
One-click swapRare
Whitespace tolerant decodeLimited
No signup / ads-free

How to Encode or Decode Base64

Base64 turns any text or binary data into a safe set of 64 printable characters, so it can travel through systems that only handle plain text — email bodies, JSON fields, data URLs and more. This tool handles both directions and does it the Unicode-safe way: your text is first encoded as UTF-8 bytes, so emoji, accented letters and non-Latin scripts survive a round trip intact rather than becoming garbled. Pick Encode to turn text into Base64, or Decode to turn Base64 back into text. Flip on URL-safe if the result needs to live in a URL or token — it swaps the + and / characters for - and _ and drops the padding. Pasted Base64 can contain line breaks and spaces; they're ignored automatically. Use Swap to send a result back to the input and reverse the operation. Everything runs in your browser, so nothing is uploaded.

1

Choose a mode

Pick Encode or Decode, and turn on URL-safe if you need it.

2

Type or paste

Enter your text or Base64; the result appears instantly.

3

Copy or save

Copy the output or download it as a text file.

What Is Base64?

The idea

Base64 represents binary or text data using 64 safe characters (A–Z, a–z, 0–9, + and /). Every three bytes become four characters, so the output is about a third larger — the trade-off for being safe to transmit anywhere.

URL-safe Base64

Because + and / have special meaning in URLs, the URL-safe variant uses - and _ instead and usually omits the = padding. It's common in JWTs, API tokens and query parameters.

Common Use Cases

Inspect a JWT

Decode the payload segment of a token to read its claims.

Data URLs

Encode small assets to embed directly in HTML or CSS.

API payloads

Encode binary data so it fits safely inside JSON fields.

Email attachments

Understand the Base64 that MIME uses to carry files.

Basic auth headers

Encode or decode credentials used in HTTP basic auth.

Config & secrets

Read Base64-encoded values in config files and manifests.

Debugging

Quickly decode a mystery Base64 string to see what's inside.

Safe transport

Encode text that must pass through text-only channels intact.

Tips & Best Practices

Base64 is not encryption

It only encodes — anyone can decode it. Never use it to hide secrets or passwords.

Match the URL-safe setting

Decode with the same variant it was encoded in, or you'll get an error or wrong output.

Mind the size increase

Encoded output is roughly 33% larger, so it's best for small payloads.

Use it for JWT payloads

The middle segment of a JWT is URL-safe Base64 — decode it to read the claims.

Whitespace is fine

You can paste multi-line Base64; spaces and line breaks are ignored on decode.

Keep UTF-8 in mind

This tool encodes text as UTF-8, the standard, so results match other correct tools.

Troubleshooting

It says the Base64 is invalid

Check for stray characters, or toggle URL-safe — the string may have been encoded in the other variant.

Decoded text looks garbled

The input probably wasn't UTF-8 text — it may be binary data, which won't display as readable characters.

The output is longer than my text

That's expected. Base64 adds roughly a third to the size in exchange for safe transport.

Padding differs from another tool

URL-safe Base64 usually drops the = padding. This tool restores it automatically when decoding.

Frequently Asked Questions

How do I encode or decode Base64 for free?

Pick Encode or Decode, type or paste your text, and the result appears instantly. Copy or download it — free, no signup.

Is it Unicode-safe?

Yes. Text is handled as UTF-8, so emoji, accents and non-Latin scripts survive a full round trip.

What is URL-safe Base64?

A variant that uses - and _ instead of + and / and drops padding, so it's safe inside URLs, tokens and query strings.

Is Base64 encryption?

No. It's an encoding, not encryption — anyone can decode it. Never use it to protect secrets.

Can I decode a JWT with this?

You can decode the URL-safe Base64 segments of a JWT to read the header and payload.

Why is the encoded text larger?

Base64 turns every three bytes into four characters, so the output is about 33% bigger.

Can I paste multi-line Base64?

Yes. Spaces and line breaks in the input are ignored when decoding.

What happens if the Base64 is invalid?

You get a clear error message rather than silent, incorrect output. Try toggling URL-safe.

Does it handle emoji?

Yes. Emoji encode and decode correctly thanks to UTF-8 handling.

Can I swap input and output?

Yes. The Swap button moves the result to the input and flips the mode to reverse the conversion.

Is my data sent to a server?

No. Everything happens inside your browser, so your data never leaves your device.

Can I download the result?

Yes. Save the output as a text file, or copy it to your clipboard.

How much text can it handle?

It comfortably handles large blocks of text, all within your browser.

Does it work offline?

Once the page has loaded it runs entirely in your browser, so it keeps working without a connection.

Which Base64 standard does it use?

Standard Base64 (RFC 4648), plus the URL-safe alphabet when you enable that option.

Can it encode binary files?

This tool focuses on text; it encodes any text you paste as UTF-8 bytes.

Does it work on phones?

Yes, in any modern browser on Windows, Mac, Android or iPhone with nothing to install.

Is this tool really free?

Completely free, forever — no account, no ads and no premium wall.

100% free · No signup · Processed in your browser · Data never sent

Last updated: August 2026 · FlipMyFormat Base64 Encode & Decode
Written and maintained by the FlipMyFormat team · Runs entirely in your browser