JSON Compare

JSON Tool

Base64 Decoder & Encoder

Encode text to Base64 or decode Base64 strings. Auto-detects and formats JSON content.

Base64 Input
Loading editor...
Decoded Output
Loading editor...

About Base64 Encoding

Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It is commonly used to encode data that needs to be stored or transferred over media designed for text.

Common Uses of Base64

  • Data URLs: Embedding images directly in HTML/CSS
  • API Authentication: Basic Auth headers use Base64
  • Email Attachments: MIME encoding for email
  • JSON Web Tokens: JWT header and payload are Base64 encoded
  • Data Storage: Storing binary data in text fields

Standard vs URL-Safe Base64

Standard Base64 uses + and / characters, which need to be URL-encoded when used in URLs. URL-safe Base64 replaces these with - and _.

Base64 Character Set

  • Uppercase letters: A-Z (26 characters)
  • Lowercase letters: a-z (26 characters)
  • Digits: 0-9 (10 characters)
  • Special characters: + and / (or - and _ for URL-safe)
  • Padding character: =

Size Increase

Base64 encoding increases the size of data by approximately 33% because it uses 4 characters to represent every 3 bytes of data.