Skip to main content
CMD Tools

Search Tools

Search for a developer tool

Home / encoders / Base64 Encoder & Decoder

Base64 Encoder & Decoder

Free online Base64 encoder and decoder. Convert text to Base64 and decode Base64 to text instantly. Supports URL-safe encoding and Unicode.

0 characters
0 characters

About Base64 Encoding

  • Base64 converts binary data into ASCII text format
  • Commonly used for encoding images, files, and data in URLs or APIs
  • URL-safe mode replaces + with - and / with _
  • Supports Unicode characters (UTF-8 encoding)

Base64 Encoder and Decoder converts plain text to Base64 and back in your browser, with support for Unicode and URL-safe output. It is useful when you need to move binary-like data through text channels such as JSON, query strings, and API headers. If your workflow also includes URL parameters or escaped markup, pair this with the URL Encoder and HTML Entity Encoder to keep values valid end to end.

How to use

  1. Paste text into the input area and choose encode mode.
  2. Switch to decode mode when you need to reverse a Base64 string.
  3. Enable URL-safe mode if the output will be used in paths, query values, or token-like strings.
  4. Copy the result for use in code, API requests, or configuration files.

For token debugging, you can decode each JWT segment separately with this tool and then inspect claim dates with the JWT Decoder. For file workflows such as data URI images, use Image to Base64 Converter.

Key features

  • Two-way conversion between plain text and Base64 in a single interface.
  • URL-safe output mode for web-safe tokens and parameter transport.
  • UTF-8 aware processing so multilingual text remains intact.
  • Client-side execution for local, private conversion.

Common use cases

  • Building Authorization headers for Basic Auth test calls.
  • Converting JSON snippets to transport-safe strings before embedding.
  • Inspecting token fragments and debugging broken payloads.
  • Preparing compact text data for systems that reject special characters.

Technical details

Base64 maps binary data into a 64-character alphabet: A-Z, a-z, 0-9, +, and /. Standard encoding processes input in 24-bit blocks (3 bytes) and emits 4 output characters. When input length is not a multiple of 3, padding is added with = to preserve block alignment. Example: Hello becomes SGVsbG8=.

URL-safe Base64 replaces + with - and / with _, and padding may be removed. This variant is common in JWT tokens and signed URLs because reserved URL characters can break routing or query parsing. If you need additional escaping for full URLs, run the output through URL Encoder.

Base64 is not encryption and does not provide confidentiality. Anyone with the encoded value can decode it. If secrecy is required, encrypt data first and only then encode it for transport.

FAQ

What is the difference between standard Base64 and URL-safe Base64?

Standard Base64 uses +, /, and optional = padding. URL-safe Base64 replaces + with -, / with _, and often omits padding so tokens can be used safely in URLs.

Can I decode malformed Base64 strings?

The decoder accepts valid Base64 input and many common URL-safe variants. If characters are invalid or required padding is missing in strict contexts, decoding can fail.

Does this tool support UTF-8 and non-English characters?

Yes. Text is handled as UTF-8, so characters like accents, emoji, and non-Latin scripts can be encoded and decoded correctly.

When should I choose this tool instead of an image Base64 converter?

Use this tool for text payloads, tokens, and quick data conversion. For file uploads and data URI workflows, use the Image to Base64 converter.

Privacy note

All conversion runs locally in your browser. Your input and output are not uploaded, logged, or stored by the tool.

Related Tools