Skip to main content
Encoding Utility

Base64 Encoder / Decoder

Encode UTF-8 text to Base64, decode Base64 back to readable text, switch to URL-safe output, and convert small local files without uploading content.

Base64 examples and workflows

Use this Base64 encoder and decoder for UTF-8 strings, URL-safe payloads, JWT-style segments, and small local files.

How to use this tool

  1. Paste text or Base64 into the input box.
  2. Choose encode or decode and toggle URL-safe output if needed.
  3. Copy the output, or convert a small local file to Base64.

Real examples

  • Encode hello world into aGVsbG8gd29ybGQ=.
  • Encode UTF-8 text such as cafĂ© without losing characters.
  • Decode a JWT-style header or payload segment locally before formatting the JSON.

Common use cases

  • Prepare small strings for config, tests, or API examples.
  • Inspect encoded payloads without uploading them.
  • Convert a small local file into a copyable data string for a fixture.

Sample input/output

  • Input: hello world.
  • Standard Base64: aGVsbG8gd29ybGQ=.
  • URL-safe mode: replaces + and /, and trims padding when needed.

Common errors and fixes

  • Invalid Base64: remove copied labels, quotes, or unsupported characters.
  • Unreadable decoded text: the payload may be binary data, not UTF-8 text.
  • JWT confusion: Base64 decoding does not verify a token signature.

Edge cases table

Case What to check
URL-safe Base64 Uses - and _ instead of + and /.
Missing padding Some systems omit trailing =; this tool pads before decoding.
Binary files File conversion can output Base64, but decode-to-text only works for valid UTF-8.

Edge cases / errors

  • Decode mode requires valid Base64 input.
  • Very large files are better handled by dedicated local tools.
  • Do not treat decoded JWT text as verified authentication data.

Useful browser-local tools for data encoding and developer fixtures.

Base64 Encoder / Decoder FAQ

Notes about Base64, URL-safe output, and local processing.

Does this upload my text?

No. Text and file conversion run locally in your browser.

Does it support UTF-8?

Yes. It uses browser UTF-8 APIs so characters outside ASCII can be encoded and decoded.

What is URL-safe Base64?

It uses hyphen and underscore instead of plus and slash, which is safer in URL contexts.

Why can decode fail?

Decode fails when the input is not valid Base64 or does not decode to valid UTF-8 text.