How to use the Base64 Encoder & Decoder
Step 1: Choose Encode text to Base64 or Decode Base64 to text.
Step 2: Type or paste your input. The result appears as you type.
Step 3: When encoding, tick URL-safe for the - and _ alphabet, or Remove = padding if the receiving system does not want it.
Step 4: Read any error message. It explains what is wrong, for example an illegal character or a missing character.
Step 5: Press Copy result or Download, or use Use result as input to go back the other way.
Features and benefits
Correct for Unicode
Text is converted as UTF-8 first, so emoji, accents and scripts such as Devanagari encode and decode without garbling.
URL-safe option
Switch to the Base64URL alphabet (- and _ instead of + and /) used in JWTs and web addresses, with or without padding.
Forgiving decoder
Line breaks, spaces, missing padding and data: prefixes are accepted. URL-safe input is detected automatically.
Clear error messages
Illegal characters and impossible lengths are explained instead of failing silently.
Works as you type
There is no button to press. The result updates with every keystroke.
What Base64 is, and what it is not
Base64 represents any data using only 64 plain characters: the letters A to Z and a to z, the digits 0 to 9, and two symbols. It exists so that binary data or text with unusual characters can travel through systems that only handle simple text, such as email bodies, JSON fields and web addresses. The output is about one third longer than the input.
It is not a security feature. There is no key and no secret, so anyone can turn Base64 back into the original text. Treat Base64 data with the same care as the original data.
Standard and URL-safe Base64
Standard Base64 uses + and / as its last two symbols, and = at the end as padding. Those characters have special meanings inside web addresses, so a second form, Base64URL, uses - and _ instead and often drops the padding. JSON Web Tokens use this second form. This tool can produce both, and the decoder recognises either.
Why decoding sometimes fails
If the input contains a character outside the Base64 alphabet, or its length cannot be right, the tool tells you which. If the input is valid Base64 but decodes to bytes that are not UTF-8 text, such as an image or a compressed file, the tool says so instead of showing garbage. Decoding files into downloads is outside what a text tool does.
Example use cases
Reading API and config values
Decode a Base64 value copied from a header, an environment variable or a configuration file.
Preparing basic data for transport
Encode short text so it survives channels that only allow plain ASCII characters.
Working with tokens
Decode a single part of a token to see what it contains.
Learning how encodings work
See how the same text turns into a different string with and without URL-safe mode or padding.
Frequently asked questions
Is Base64 encryption?
No. It is a reversible encoding that anyone can decode. Never use it to protect secrets.
Why does my decoded text show strange characters?
The data may not be UTF-8 text. If it is an image or a file, it will not make sense as text.
What is the difference between Base64 and Base64URL?
Base64URL replaces + and / with - and _ and usually omits the = padding, so it is safe inside web addresses and tokens.
Does it support emoji and non-English text?
Yes. Text is encoded as UTF-8 before it is converted, so all Unicode characters round-trip correctly.
Is my text uploaded anywhere?
No. Encoding and decoding happen in your browser and nothing is stored.
Related tools
URL Encoder & Decoder
Percent-encode or decode text and URLs, and see a URL split into parts and query parameters.
Developer Tools
JWT Parser & Decoder
Decode a JSON Web Token to read its header, payload, claims and expiry. Nothing is uploaded.
Developer Tools
JSON Formatter & Validator
Format, validate and minify JSON, with exact error locations. Runs in your browser.
Developer Tools
Last updated 11 November 2026.