Skip to content
ToolKloud.43 Free Online Tools
Back to all tools
Converters Utility
100% On-Device β€’ Files never leave your browser

Base64 Encoder & Decoder

Encode text to Base64 or decode Base64 back to text, with full Unicode handling. Base64 is what lets binary or awkward text survive transport through systems that only accept plain ASCII β€” data URIs, JSON payloads, config files and HTTP headers.

How it works

  1. 1

    Choose a direction: encode text to Base64, or decode Base64 to text.

  2. 2

    Paste the input.

  3. 3

    Read the converted output as you type.

  4. 4

    Copy it into your code, configuration or request.

What people use it for

  • Building a Basic Authorization header value from a user and password pair.
  • Decoding a Base64 blob found in a log line, config file or API response.
  • Preparing a small asset or payload for embedding as a data URI.
  • Encoding text so it survives a transport that mangles special characters.

Supported formats & options

Encode inputAny UTF-8 text, including non-Latin scripts and emoji
Decode inputStandard Base64 strings
OutputBase64 text, or the decoded original text

Key advantages & benefits

Unicode-safe

Text is UTF-8 encoded before Base64, so accented characters, emoji and non-Latin scripts survive the round trip instead of turning into question marks.

Both directions in one place

Encode a value for a header and decode one from a log without switching tools.

No command line needed

Equivalent to base64 on the terminal, available on a machine where you cannot install anything.

Values stay local

Encoding a credential or a token does not send it anywhere.

Limits & things to know

  • Base64 is encoding, not encryption. Anyone who has the string can decode it β€” never treat a Base64 value as a secret in transit or at rest.
  • This tool converts text. It does not accept a file upload and produce a Base64 blob of its bytes.
  • URL-safe Base64 (which uses - and _ instead of + and /) is a variant; substitute the characters yourself when a system requires it.
  • Encoding inflates size by roughly a third, which is why embedding large assets as data URIs usually makes pages slower rather than faster.

Troubleshooting

Decoding fails with an invalid character error

The string is probably URL-safe Base64 or has been line-wrapped. Replace - with + and _ with /, and remove line breaks, before decoding.

Decoded text shows garbled characters

The original bytes were not UTF-8 text β€” they may be binary data or a different encoding. Base64 preserves bytes faithfully; the mismatch is in the interpretation.

Padding errors

Base64 length must be a multiple of four. A string truncated when it was copied needs the missing = padding restored, or a fresh copy of the original.

Privacy & data handling

Encoding and decoding are performed in your browser with the built-in btoa and atob functions. Nothing you paste β€” including credentials you are encoding for a header β€” is transmitted or logged.

Base64 Encoder & Decoder β€” Convert Text and Images Online

Encode text or files to Base64 and decode Base64 strings back to their original form. A free online Base64 converter for data URIs, API payloads, email attachments, JWT segments and any place binary data has to travel as plain text.

  • Base64 encode and decode both ways β€” paste a string in either direction and convert instantly β€” the tool detects nothing and guesses nothing, so the result is predictable.
  • Image to Base64 data URI β€” turn a small logo or icon into a data URI you can inline in CSS or HTML, removing one network request from the critical path.
  • Base64 to image preview β€” paste an encoded blob from an API response or a log and see the actual image it represents.
  • URL-safe variant supported β€” handles the hyphen and underscore alphabet used in JWTs and query parameters, not just standard Base64.
  • Nothing is uploaded β€” encoding runs locally, which matters because Base64 is encoding, not encryption β€” anyone with the string can read the payload.

Free and unlimited. Inspect a token's decoded contents properly with the JWT Decoder, and hash data one-way with the Hash Generator.

Frequently asked questions

Is Base64 encryption?

No, Base64 is an encoding scheme, not encryption. It represents binary data as ASCII text.

Is Base64 a form of encryption?

No. It is a reversible encoding with no key, so anyone holding the string can decode it instantly. Never use it to protect a secret.

Why does decoding fail on my string?

Usually URL-safe Base64, which uses - and _ in place of + and /. Substitute those characters back, remove any line breaks, and restore the = padding if it was trimmed.

Does it handle emoji and non-English text?

Yes. Text is UTF-8 encoded before Base64 and decoded back the same way, so accented characters, emoji and non-Latin scripts survive the round trip intact.

Related tools