Back to Dev Tools
100% Client-side & Private Sandbox

Base64 & Hex Encoder / Decoder

Security & Auth

Encode and decode text strings to and from standard or URL-safe Base64 representation.

Action:
Raw Text Input
Plain Text / Monospace1 line · 52 chars
Base64 OutputENCODE
Plain Text / Monospace1 line · 72 chars
Guide & Documentation

Base64, Hex & URL-Safe Binary Data Encoder / Decoder

Encode plain text and UTF-8 strings into Base64 or Hexadecimal format, and decode Base64 strings back to text. Supports standard RFC 4648 and URL-safe Base64url encoding.

How Base64 Encoding Works

01

Input Plain Text or Base64

Type or paste your raw text into the input panel, or paste an existing Base64 payload to decode.

02

Select Mode & Options

Toggle between Encode and Decode modes, and enable URL-safe encoding (- and _ replacing + and /).

03

Inspect & Copy Output

Copy formatted Base64, Hex, or decoded plain text with instant one-click clipboard copying.

Base64 Utility Features

URL-Safe Base64url Support

Replaces '+' with '-' and '/' with '_' without padding for clean HTTP query parameters and JWT tokens.

Hexadecimal Byte Representation

Simultaneously generates hex byte string outputs alongside standard Base64 encoding.

UTF-8 Multi-byte Characters

Accurately handles international Unicode characters, symbols, and emoji without garbled text.

Base64 Best Practices

  • §1Base64 is an encoding format, NOT encryption — never rely on Base64 to conceal secrets or sensitive data.
  • §2Use URL-safe Base64 without padding when embedding tokens in URL query strings to avoid escaping bugs.
  • §3Remember that Base64 increases binary data size by approximately 33% due to 6-bit grouping.

Frequently Asked Questions

What is the difference between standard Base64 and URL-safe Base64?
Standard Base64 uses '+' and '/' characters, which have special meanings in URLs. URL-safe Base64 (base64url) replaces '+' with '-' and '/' with '_', making it safe for query parameters and JWTs.
Is this encoder safe for private API keys?
Yes, all encoding and decoding runs in-browser using JavaScript. No payload is ever sent to a server.
Why does Base64 increase data size?
Base64 represents 3 binary bytes (24 bits) using 4 ASCII characters (32 bits), resulting in an approximate 33% overhead.