Base64 Encode & Decode Online — Unicode & URL-safe
Convert text between UTF-8 and Base64 without leaving your browser. Toggle URL-safe alphabet when you embed tokens in URLs or JWT segments. Copy results in one click — nothing is uploaded.
How this Base64 tool works
Choose Encode to transform readable text into a compact ASCII-safe representation that only uses letters, digits, +, / and optional padding. Choose Decode to reverse the process: paste Base64 (with or without URL-safe characters) and instantly recover the original Unicode string. Everything executes locally — ideal when you need to prepare snippets for APIs, compare payloads with backend logs, or quickly sanity-check configuration secrets.
URL-safe Base64 option
RFC 4648 defines an alternate alphabet where + becomes - and / becomes _. Padding characters (=) are typically trimmed so values fit cleanly inside URLs or HTTP headers. Remember that Base64 is encoding, not encryption: anyone can decode it. Treat it as a transport representation, not a security boundary.
Practical examples
Unicode caption → Base64
Sample input
Expected output
JWT-style fragment (URL-safe)
Sample input
Expected output
Combine with other FastMinify utilities
Need percent-encoding instead of radix-64? Jump to the URL encoder. Sanitizing markup snippets works great alongside the HTML entities tool, while shipping scripts stays fastest through our JavaScript minifier.
Base64 FAQ
Answers teams ask before piping strings through Base64 pipelines
Does Base64 change my Unicode characters?
No meaningful loss occurs: UTF-8 preserves emoji and accented glyphs before the Base64 stage. Decoding reconstructs the exact original text.
When should I enable URL-safe mode?
Turn it on whenever + or / would collide with URL delimiters or when your downstream parser expects JWT/Base64URL semantics.
Why does decoding fail with InvalidCharacterError?
Common culprits include stray whitespace, missing padding (standard mode only), or mixing URL-safe characters without enabling the toggle.
Is data uploaded?
Never — conversions stay inside your browser tab.
How does this relate to Data URIs?
You can Base64-encode binaries or SVG/text payloads for data: URIs, but validate CSP rules before deploying inline assets.
Can I embed secrets?
Base64 does not protect confidentiality. Use proper secret managers instead of assuming encoded strings are hidden.
Is Base64 the same as encryption?
No. Base64 only represents bytes as ASCII text; anyone can decode it. It is not a substitute for encryption or signing.
Does padding matter when decoding?
In standard mode, missing = padding can cause decode errors. URL-safe mode often omits padding—enable the matching option so input and settings stay aligned.