InTab

Base64

Encode and decode Base64 text and files (URL-safe supported).

Encoders: Escape, encode and decode text. It runs in your browser, so nothing you enter is uploaded.

What it does

The Base64 tool encodes text to Base64 and decodes it back, and does the same for files of any type. It supports the URL-safe variant used in JWTs and web addresses, and line wrapping at 76 characters for email (MIME).

How to use it

Text

  1. Type or paste text into Text (UTF-8) to encode it, or paste Base64 into the Base64 pane to decode it.
  2. Tick URL-safe to use - and _ without = padding, or Wrap at 76 for MIME.

Files

  1. Open the File ⇄ Base64 section.
  2. Encode a file to get its Base64 or data URI.
  3. Or paste Base64 and choose Decode to a file to download the original file.

Example

Text Base64 URL-safe
Hello, wörld! SGVsbG8sIHfDtnJsZCE= SGVsbG8sIHfDtnJsZCE

Good to know

  • Base64 is not encryption. Anyone can decode it. Use Encrypt / Decrypt to protect data.
  • Base64 makes data about a third larger: every 3 bytes become 4 characters.
  • Text is encoded as UTF-8, so accented letters and emoji round-trip correctly.

FAQ

What is the difference between Base64 and Base64URL? Base64URL replaces + and / with - and _ and usually drops the = padding, so the result can be used in URLs and file names. JWTs use Base64URL.

How do I turn an image into Base64 for CSS or HTML? Use Image to Base64, which also builds the CSS, HTML and Markdown snippets.

Guides

More Encoders tools

  • Unicode Escape: Encode and decode JSON or XML text to Unicode escapes (\uXXXX, &#x…;).
  • Image to Base64: Turn an image into a Base64 data URL, raw Base64, CSS, HTML or Markdown.
  • Base64 to Image: Paste Base64 or a data URL to see the image and download it.
  • URL Encoder: Percent-encode and decode URLs; parse URL parts and query parameters.
  • HTML Entities: Escape and unescape HTML entities.
  • JWT Encoder / Decoder: Decode, verify and sign JSON Web Tokens: HS, RS, PS, ES and EdDSA, with key generation.