Text guide 01
GUIDE · TEXT

Base64 and URL encoding, explained with examples

Paste text, choose the Base64 or URL tab, then switch between Encode and Decode. The result appears instantly with live character and byte counts, and you can copy it with one click. The Base64 tab adds a URL-safe mode, data URI prefix stripping, and file-to-Base64 conversion. All processing stays in your browser.

Which tab to use

Base64

Encodes text into ASCII strings like aGVsbG8=. Use it for API payloads, data URIs, and tokens.

URL encoding

Converts reserved characters into percent codes like %20. Use it for query strings and URLs with special characters.

1. Encode text

  1. Open the tool and pick the Base64 or URL tab.
  2. Make sure the Encode chip is active.
  3. Paste or type your text in the input box.
  4. The encoded result appears in the output box — press Copy to use it.

2. Decode text

  1. Switch to the Decode chip.
  2. Paste the encoded string into the input box.
  3. The decoded text appears below. If the input is invalid, an error message tells you what is wrong.
Open the encoder

Quick examples

InputBase64URL encoded
helloaGVsbG8=hello
hello worldaGVsbG8gd29ybGQ=hello%20world
a/b?c=dYS9iP2M9ZA==a%2Fb%3Fc%3Dd

URL encoding leaves plain letters and digits untouched and only escapes reserved characters.

Options on the Base64 tab

URL-safe

Replaces + with - and / with _, and drops = padding. Use it for tokens and URL parameters.

Strip data URI prefix

Removes the data:…;base64, header before decoding, so you can paste a full data URI.

Ignore whitespace

Strips line breaks and spaces before decoding. Handy for Base64 copied from wrapped emails or documents.

File to Base64

Pick a file in the File to Base64 section to convert it locally — for example, to embed a small image as a data URI in HTML or CSS. The file is read with the FileReader API and never uploaded.

Privacy and limitations

Encoding and decoding run entirely in your browser — pasted text and chosen files are never uploaded. Base64 is not encryption and does not protect secrets. The tool handles UTF-8 text; very large files may be slow to convert.

Do not paste passwords, API keys, or private tokens into any online encoder you do not trust. This one never sends your text anywhere, but the warning stands for other sites.

Sources

FAQ

What is the difference between Base64 and URL encoding?

Base64 converts binary or text data into a safe ASCII string (used in data URIs, tokens, and APIs). URL encoding converts reserved characters like spaces and slashes into percent codes (used in query strings). Pick the tab that matches your use case.

Is Base64 encryption?

No. Base64 is a reversible encoding — anyone can decode it. Never use it to hide passwords, tokens, or secrets.

Why does my decoded text show an error?

The input is probably not valid Base64. Check for missing padding characters (=) or stray whitespace, then try again.

Does the tool handle non-English text?

Yes. Text is converted to UTF-8 bytes before Base64 encoding, so Korean, Japanese, emoji, and other scripts round-trip correctly.

Is my pasted text uploaded to a server?

No. Encoding and decoding happen entirely in your browser. Nothing you paste ever leaves your device.

What is URL-safe Base64?

A variant that replaces + with - and / with _ and drops the = padding, so the output is safe inside URLs and filenames. Turn on the URL-safe option before encoding; decoding accepts both alphabets automatically.

How do I decode a data URI?

Paste the full data:image/png;base64,... string and turn on "Strip data URI prefix" — the tool removes the header and decodes the payload.