Base64 Encode / Decode
Client-sidePopularFeaturedNewEncode UTF-8 text to Base64 or decode Base64 back to text — instantly in your browser.
Base64 Encode / Decode converts UTF-8 text to Base64 and back in your browser. Base64 is encoding, not encryption, and your input is not uploaded.
Processed in your browser — data stays on your device
Key takeaways
- UTF-8 safe encode and decode
- Runs fully client-side
- Not encryption — reversible by design
- Intent pages cover text, JSON, HTML, and URL use cases
What is Base64?
Base64 encodes binary or text as ASCII using 64 characters so data can travel in text-only channels.
Anyone can decode Base64. Use it for transport and embedding (JSON, email, data URLs), not for secrecy. This tool uses UTF-8 for text round-trips.
Features
UTF-8 safe
Correctly encodes and decodes Unicode text, not just ASCII.
Encode & decode
One workspace for both directions with clear primary actions.
Data URL friendly
Paste a data:...;base64,... value and decode the payload.
Copy & download
Move results into tickets, configs, or editors in one click.
How it works
Paste text or Base64
Use plain text for Encode, or a Base64 string for Decode.
Choose Encode or Decode
Encode produces Base64. Decode restores UTF-8 text.
Copy the result
Copy or download the output for use in code or payloads.
Example walkthroughs
Hello World
Encode produces SGVsbG8sIFdvcmxkIQ==.
Hello, World!
Unicode
UTF-8 bytes are Base64-encoded without mojibake.
café ☕
Use cases
Embed secrets in configs
Encode short tokens or keys for YAML/JSON configuration files.
Inspect data URLs
Decode Base64 segments from data URLs or API responses.
Debug JWT segments
Pair with JWT Decode when you need raw Base64URL inspection.
Code snippets
UTF-8 Base64 in the browser
jsThis tool uses the same UTF-8 → Base64 approach for Unicode text.
const bytes = new TextEncoder().encode(text); const b64 = btoa(String.fromCharCode(...bytes));
Common errors
Invalid character in decode
Cause: The string includes spaces, newlines, or non-Base64 characters.
Fix: Strip whitespace or paste a clean Base64 / data-URL payload.
Mojibake after decode
Cause: The original bytes were not UTF-8 text (or were Latin-1 treated as UTF-8).
Fix: Confirm the source encoding; this decoder emits UTF-8 text.
About Base64 Encode / Decode
Base64 Encode / Decode converts between plain UTF-8 text and Base64 so you can embed binary-safe payloads in JSON, APIs, emails, and data URLs.
Everything runs in your browser — your strings never leave the device.
Frequently asked questions
Is Base64 encryption?
No. Base64 is encoding for transport, not encryption. Anyone can decode it.
Does this support binary files?
This tool targets text. Paste text or Base64 text; large binary uploads are not the focus.
Is my data uploaded?
No. Encoding and decoding run entirely in your browser on this site.
Related tools
URL Encode / Decode
Percent-encode text for URLs or decode encoded query strings — private and instant.
JWT Decode
Decode JWT header and payload in your browser — inspect claims without uploading tokens.
Base64 Encode Text
Encode plain text notes, messages, and Unicode strings to Base64 in your browser — private and instant.
Base64 Encode JSON
Encode JSON payloads to Base64 for APIs, JWTs, and transport — decode back to UTF-8 JSON in your browser.
Base64 Encode HTML
Encode HTML fragments and markup to Base64 for data URLs, emails, and embeds — decode back in your browser.
Base64 Encode URL
Encode URLs and query strings to Base64 for opaque links and redirects — distinct from percent-encoding.
Popular tools
JSON Formatter
Format, beautify, and minify JSON in your browser. Free, private, and instant — no upload to a server.
JSON Validator
Validate JSON instantly in your browser. See type, size, and node counts — or exact parse errors with line and column.
JSON Viewer
Explore JSON as an interactive tree with paths, types, and expandable nodes — all processed locally in your browser.
UUID Generator
Generate UUID v4 identifiers in bulk — uppercase and hyphenless options, fully client-side.
Newest tools
Hash Generator
Generate SHA-1 / SHA-256 / SHA-384 / SHA-512 digests of text with Web Crypto — fully client-side.
JSON Compare
Compare two JSON documents structurally. Find added, removed, changed, and type-changed paths — privately in your browser.
JSON Diff
Generate a unified diff of two JSON documents after pretty-printing. Ideal for reading line-level changes quickly.
JSON Escape
Escape text into a JSON string literal, or unescape a JSON string back to raw text — instantly and offline.
Explore more
Guides & articles
How to decode a JWT safely (without trusting claims)
Inspect JWT header and payload in your browser. Learn why decoding is not verification, and which claims matter when debugging auth.
Base64 for developers: text, JSON, URLs, and what it is not
Learn when to Base64-encode text or JSON, how that differs from URL percent-encoding, and why Base64 is not encryption.
Keyboard shortcuts
Common keyboard shortcuts for Tools by RS Roshi workspaces — format, copy, reset, and global search.
Privacy model (client-side tools)
How Tools by RS Roshi handles data: browser-first processing, what we do not upload, and how that claim maps to product behavior.
How tools work on this site
Architecture overview for Tools by RS Roshi: registry-driven pages, lazy panels, SEO content, and client processors.
Base64 encoding on the RS Roshi blog
Encoding tutorials and edge cases for base64 encoding.
Privacy model
Why encoding tools process data only in your browser.