Base64 decode and encode.
Paste base64 and read it, or type text and get base64 back. Emoji and every language survive the trip.
- Free
- No signup
- Runs in your browser
Standard and URL-safe base64 both work. Line breaks and missing padding are fine.
75 B of UTF-8, 67 characters.
How it works.
- 1
Pick Decode or Encode, then paste base64 or type your text. A file works too.
- 2
The result updates as you type. Bad characters and cut-off input are pointed out.
- 3
Copy the result, or download it when the base64 turns out to be a file.
What base64 is for
Base64 writes any bytes using 64 safe characters: A to Z, a to z, 0 to 9, + and /. That lets binary data travel through places that only take text, like JSON, email attachments, data URLs and HTTP Basic auth headers.
It costs size. Every 3 bytes become 4 characters, so base64 is about a third bigger than the original. It is an encoding, not encryption: anyone can decode it.
Why UTF-8 and URL-safe matter
The browser's own btoa throws on anything outside Latin-1, so an emoji or a Chinese character breaks it. This tool turns text into UTF-8 bytes first, which is what servers and other languages expect.
URL-safe base64 swaps + and / for - and _ and drops the = padding, so the value can sit in a URL or a filename. JWTs use it. The decoder reads both forms without being told which.
Questions, answered.
How do I decode base64?
Paste the base64 into the decoder above. The text appears on the right as you type. If the data is a file, like an image or a PDF, you get a preview or a download button instead.
Why does my decoded base64 look like gibberish?
The data is probably not text. Base64 often carries images, zip files or encrypted bytes. The tool spots that, shows the bytes as hex, and lets you download them as a file.
What is URL-safe base64?
The same encoding with - and _ in place of + and /, usually without the = padding at the end. It is defined in RFC 4648 and used in JWTs, URLs and filenames.
How do I decode base64 in JavaScript?
In Node, Buffer.from(value, "base64").toString("utf8"). In the browser, atob alone mangles UTF-8, so decode the bytes: new TextDecoder().decode(Uint8Array.from(atob(value), (c) => c.charCodeAt(0))).
Is base64 a kind of encryption?
No. Base64 hides nothing. Anyone can decode it in a second, as this page shows. Never use it to protect passwords or keys.
More free tools.
All tools- JWT DecoderRead a JWT's header, payload and expiry without sending the token anywhere.
- UUID GeneratorBulk UUID v4, v7, GUID and NanoID, formatted the way you need.
- JSON FormatterPretty print, sort keys or minify JSON. Big numbers stay exact.
- SVG to PNGRender an SVG as a crisp PNG at any size, transparent or on a colour.
Decoded. Now build what sends it.
Let people sign in with Google.. Add API keys my users can create and revoke.. Send a welcome email right after signup.Hype Stack is a free SaaS starter: web, admin, desktop, mobile and extension apps on one Hono API, in one repo. Your coding agent builds features, not plumbing.