Convert text to Base64 and back. Unicode text (accents, emoji, any language) is encoded as UTF-8, so the result matches what servers and other tools expect. Nothing leaves your browser.
Base64 encode and decode is a free online tool by Hack the Hydra. Encode text to Base64 or decode Base64 to text online. Handles UTF-8, accents and emoji correctly; URL-safe option. Private, runs in your browser.
Why UTF-8 matters
The browser's built-in btoa() function fails on any character outside Latin-1, and decoding with atob() alone gives garbled text for accents. This tool first converts your text to UTF-8 bytes and then to Base64 (and the reverse), so "héllo ✓" round-trips exactly and matches the output of command-line tools such as base64 on Linux or macOS.
URL-safe Base64
Standard Base64 uses + and / and ends with = padding, which are awkward in URLs and file names. The URL-safe variant used by JWTs replaces them with - and _ and drops the padding. Tick the option when encoding; decoding accepts both variants automatically and ignores spaces and line breaks.
Base64 is not encryption
Base64 only changes how bytes are written, it hides nothing. Anyone can decode it. Never use it to protect passwords or secrets; use real encryption for that. It is useful for embedding small data in text formats such as JSON, HTML, email and data: URLs, at the cost of about 33% more size.
Example
Encoding a short text to Base64.
Input
Hello, world!
Output
SGVsbG8sIHdvcmxkIQ==
How to use
- Type or paste your text in the box above.
- The result updates as you type; change the options to switch mode.
- Copy the result or download it.
FAQ
Is my data uploaded?
No. Encoding and decoding are done by JavaScript in your browser.
Why does decoding say the bytes are not valid UTF-8?
The Base64 is valid but it represents binary data, such as an image or a file, rather than text. This tool works with text only.
Can I decode a JWT with this?
You can paste one segment (header or payload) of a JWT to read its JSON; the segments are URL-safe Base64 and are accepted without padding. The signature is not verified.
Does it add line breaks?
No. The output is one continuous line, which is what most APIs expect.
Guides