Free Base64 Encoder & Decoder
Convert text to Base64 and back. Works with full Unicode via UTF-8, and runs entirely in your browser so nothing is uploaded.
Quick answer
Base64 is a way to represent binary data using 64 printable ASCII characters. It maps every 3 bytes of input to 4 output characters, padding the end with “=” when needed. It is an encoding, not encryption — anyone can decode it instantly, so never use Base64 to hide or protect secrets.
Formula & method
Text is first converted to bytes using UTF-8, then those bytes are grouped three at a time and mapped to four characters from the Base64 alphabet (A–Z, a–z, 0–9, + and /). Decoding reverses the process. The tool handles Unicode correctly, so emoji and accented characters round-trip without corruption.
Examples
- Input
- Hello
- Result
- SGVsbG8=
- Why
- Five bytes encode to eight Base64 characters, including one “=” pad.
- Input
- Hi
- Result
- SGk=
- Why
- Two bytes need padding to complete the final group of four.
- Input
- d29ybGQ=
- Result
- world
- Why
- Decoding turns the Base64 text back into the original string.
When to use this tool
- Inspecting a Base64 string from a token, data URI, or config file.
- Embedding small data inline where only text is allowed.
- Quickly decoding a Base64 value to read what it contains.
Common mistakes
- Treating Base64 as encryption. It only obscures data; it provides no security.
- Forgetting that Base64 grows the size by about one third.
- Mixing up standard Base64 (with + and /) and URL-safe Base64 (with - and _).
Frequently asked questions
What is Base64 used for?
It encodes binary or text data as plain ASCII so it can travel safely through systems that expect text, such as data URIs, email attachments, and some tokens.
Is Base64 encryption?
No. It’s a reversible encoding with no key, so anyone can decode it. Never use it to protect secrets.
Why are there “=” signs at the end?
They’re padding. Base64 works in groups of four characters, so “=” fills out the final group when the input length isn’t a multiple of three bytes.
Does it handle emoji and accents?
Yes. The tool encodes text as UTF-8 first, so Unicode characters encode and decode correctly.
Is my input uploaded?
No. Encoding and decoding happen entirely in your browser.
What is URL-safe Base64?
Standard Base64 uses + and / characters, which aren't safe in URLs. URL-safe Base64 replaces them with - and _. This tool uses standard Base64; use a URL encoder for URL-safe variants.
What happens if I try to decode something that isn't Base64?
The tool will reject it with an error. Base64 must be valid ASCII and divisible into groups of 4, so random text or corrupted data will fail.
- ✓ Free to use
- ✓ No sign-up required
- ✓ Runs entirely in your browser — nothing is uploaded.
- ✓ Formula and method shown above
Provided “as is” for general information only — results may be inaccurate, so verify before you rely on them. No warranty; use at your own risk.
Built and reviewed by HIFreeTools against the formula shown above and any authoritative references cited on this page. See our methodology and editorial standards.
Related tools
- JSON Formatter & ValidatorDeveloper
- QR Code GeneratorDeveloper
- URL Encoder & DecoderDeveloper
- UUID GeneratorSecurity
- Password GeneratorSecurity
- Unix Timestamp ConverterDeveloper
- Text Case ConverterText
- Character CounterText
Related guides
Embed this tool on your site
Free to embed, no sign-up. Paste this code where you want the base64 encoder & decoder to appear: