Encode text to Base64 or decode Base64 back to text — instantly, in your browser.
This free online tool converts text to and from Base64 — the encoding used to safely represent binary or text data as ASCII, commonly seen in data URIs, Basic Auth headers, and email attachments. Type or paste your text, pick Encode or Decode, and get the result immediately.
-/_ instead of +// and drop padding, for Base64 that needs to go inside a URL or filename.
Plain JavaScript's btoa() throws on any character outside the Latin-1 range, which
breaks on emoji, accented letters, and most non-English text. This tool encodes text as UTF-8
bytes first, so any Unicode text — including emoji — encodes and decodes correctly.
All encoding and decoding happens entirely in your browser using JavaScript. Nothing you type is ever sent to a server.
Base64 has a couple of variants that matter depending on where the encoded text ends up. Here's what each option on this page does.
Uses the characters A-Z a-z 0-9 + / with = padding at the end. This is the default and matches what most libraries and command-line tools (like base64) produce.
Replaces + with - and / with _, and omits padding — because standard Base64's characters have special meaning in URLs and filenames. Common in JWTs and URL parameters.
Text is first converted to its UTF-8 byte representation before Base64 encoding, and decoded the same way in reverse — so accented characters, symbols, and emoji round-trip correctly.
If the Base64 input contains invalid characters or can't be decoded as valid UTF-8, the tool shows an inline error instead of producing garbled or silently wrong output.
Decode a Basic Auth header, a JWT segment, or a Base64-encoded field in an API response to see its real value during debugging.
Encode config values, tokens, or small binary blobs into Base64 text for embedding in JSON, environment variables, or config files.
Build or inspect small inline data URIs (data:text/plain;base64,...) without reaching for a script or command-line tool.
See exactly how Base64 encoding works, character by character, while learning about data encoding and transport formats.
Base64 is a way to represent binary or text data using only 64 printable ASCII characters (A-Z a-z 0-9 + /), commonly used when data needs to be safely embedded in text-based formats like JSON, XML, URLs, or email.
No. Base64 is an encoding, not encryption — it provides no confidentiality. Anyone can decode Base64 text back to its original form instantly, which this tool demonstrates. Never use Base64 alone to protect sensitive data.
Standard Base64 uses + and /, which have special meaning inside URLs. URL-safe Base64 replaces them with - and _ and drops the = padding, so the result can be used directly inside a URL or filename without further encoding.
Decoding fails if the input contains characters outside the Base64 alphabet, or if the decoded bytes aren't valid UTF-8 text. This usually means the input is truncated, corrupted, or wasn't actually Base64 to begin with.
No. All encoding and decoding happens locally in your browser with JavaScript. Nothing is sent to a server.
Built by Deepak Kumar — a developer who wanted a JSON tool that respects your privacy. All processing happens in your browser. Your data never leaves your device.