{ }JSONKit.tools

Base64 Encode Online

Turn any text into Base64 — emoji and non-Latin scripts included. Toggle URL-safe when the result has to travel inside a URL or a JWT.

Encode⇄Decode

Text

Base64

Waiting for input…

About this tool

Base64 exists to carry arbitrary bytes through channels that only accept text: an HTTP header, a data URI, an email body, a JSON string. This encoder converts your input to UTF-8 first, which is what makes non-Latin text and emoji come back unchanged — the browser's own btoa() rejects them outright. The URL-safe switch replaces + and / with - and _ and drops the = padding, the variant used by JWTs and URL parameters.

How to use it

  1. 1Paste or type the text you want to encode on the left.
  2. 2Turn on URL-safe if the result will end up in a URL, a filename or a JWT.
  3. 3Press Copy — decoding it back is one click away on the Base64 Decode page.

Frequently asked questions

›Why does Base64 make my data bigger?

It encodes every 3 bytes as 4 printable characters, so the output is about 33% larger. That is the price of moving binary data through a channel that only accepts text.

›What is URL-safe Base64?

The standard alphabet uses + and /, which have their own meaning in a URL, and = padding, which needs escaping. The URL-safe variant swaps them for - and _ and drops the padding, so the result can be dropped into a path or query string as is. JWTs use exactly this variant.

›Does it handle emoji and non-Latin text?

Yes. The text is encoded as UTF-8 first, so Cyrillic, Chinese and emoji survive intact. The naive browser one-liner btoa(text) throws on any character above U+00FF.

›Is Base64 encryption?

No, and this matters. It is an encoding, not a cipher — anyone can decode it instantly, no key involved. Never use it to hide a password or a token.

›How do I do this from the command line?

On macOS and Linux: printf %s "text" | base64. To decode, add the -d flag. Windows PowerShell needs [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("text")).