Back

Base64 Encode/Decode

Encode or decode Base64 quickly.

Free • Unlimited (Beta)

Limits will be introduced later; early users will get benefits.

Examples:

  • Text "Hello" encodes to "SGVsbG8="
  • Base64 "SGVsbG8=" decodes to "Hello"

Related tools

UUID Generator

Generate UUID v4 instantly.

UUID Generator Security
Open
JSON Formatter

Format and validate JSON.

JSON Formatter Validation
Open
URL Encode/Decode

Encode or decode URLs safely for web requests.

URL Encode Decode Querystring
Open

About Base64 Encode and Decode

Overview

Base64 encoding turns binary data or text into a string of ASCII characters (A–Z, a–z, 0–9, +, /, and padding =). It is used to embed binary data in JSON, XML, or URLs, or to send binary content over protocols that only support text. This tool encodes and decodes Base64 so you can prepare data for APIs, decode tokens or payloads, or troubleshoot encoding issues. Decoding is strict: invalid characters or incorrect padding produce an error so you know the input is not valid Base64.

Base64 is not encryption; it is reversible. For hashing, use the Hash Generator; for URL-safe encoding, use the URL Encode/Decode tool.

When to use it

Use encode when you need to include binary or special characters in JSON, form data, or headers without breaking the format. Use decode when you receive Base64 from an API (e.g. image data, JWT payloads) or need to inspect the content. Developers often use it for small file uploads as data URLs or for encoding credentials in HTTP Basic Auth. The JWT Decoder decodes the header and payload of JWTs, which are Base64-encoded; this tool can decode any raw Base64 string.

How to use it

Paste text or Base64 string into the input area. Click Encode to convert the input to Base64 (UTF-8 encoding for non-ASCII). Click Decode to convert Base64 back to readable text or binary representation. Invalid Base64 on decode shows an error message. Use Copy to copy the result. Clear resets both input and output. No options are required for standard Base64; the tool uses the common alphabet and padding.

Tips

Base64 increases size by about one third; use it only when the protocol or format requires it. For URL-safe Base64 (e.g. in JWT), some systems use base64url (replace +/ with -_). This tool uses standard Base64; for base64url you may need to replace characters before decoding. Do not use Base64 for passwords or secrets—it is easily reversed. Use the Hash Generator for one-way hashes or the Password Generator for secure random values.

Common mistakes

Pasting Base64 that includes line breaks or spaces can cause decode errors; strip whitespace first. Base64url (with - and _) must be converted to standard Base64 (+ and /) before decoding if your decoder expects the standard alphabet. Double encoding (encoding already Base64 text) produces a longer string that decodes to the original Base64, not the original content. Ensure the source is actually Base64; random text often fails to decode.

↑ Back to top

FAQ

Base64 encodes binary data as ASCII text using 64 characters. It is used to embed binary in text-only formats.

Yes. No sign-up required.

No. Encoding and decoding happen in your session; we do not store input or output.

Invalid characters, wrong padding, or non-Base64 text (e.g. copy-paste with extra spaces) cause decode errors.

Base64 is for binary/data embedding; URL encoding is for safe characters in URLs and query strings. Use URL Encode/Decode for URLs.