Unformat.online
More tools
Clean Text
Strip smart quotes, zero-width characters, non-breaking spaces, and invisible Unicode from any pasted text.
Markdown Viewer
Live split-view editor and renderer — edit on the left, preview on the right.
Text Diff Checker
Compare two texts, JSON payloads, or config files and see exactly what changed, line by line.
Log File Viewer
Open multi-gigabyte log files instantly — chunked indexing and virtual scrolling handle 10GB+ files without freezing your tab.
FileSQL
Drop a CSV or JSON file and query it with SQL instantly — no upload, no server.
Format SQL
Format SQL for MySQL, PostgreSQL, BigQuery, T-SQL, and more — uppercase keywords, proper indentation.
Schema Visualizer
Paste CREATE TABLE statements and get an ER diagram instantly — tables, columns, keys, and foreign-key relationships.
Format JSON
Prettify or minify JSON. Auto-fixes single quotes, trailing commas, and unquoted keys.
Format YAML
Format and validate YAML. Catches indentation errors in Kubernetes, Docker Compose, and GitHub Actions files.
Format XML
Indent and pretty-print XML. Works with SOAP, RSS, Maven POM, Android manifests, and SVG.
JWT Debugger
Decode JWTs instantly — view all claims, check expiry, and see the algorithm. Token never leaves your browser.
Shredder
Remove EXIF, GPS, and author metadata from images and PDFs. Redact secrets from text and log files.
SSL Certificate Checker
Check any domain's SSL/TLS certificate — expiry, issuer, and Subject Alternative Names.
PDF Tools
Merge, split, rotate, or sign PDFs, fill in forms, and add text — entirely in your browser, nothing uploaded.
CronScope
Paste a cron schedule and see every run on a 12-month calendar. Never misread a cron expression again.
Regex Tester
Test regex patterns against sample text with live-highlighted matches, or pick from a library of ready-made patterns — no regex knowledge required.
Base64
Encode text or files to Base64, or decode Base64 strings and preview images inline.
URL Encode / Decode
Encode URLs or decode percent-encoded strings like %20, %3D, %26 — instantly.
UUID Generator
Bulk-generate cryptographically random v4 UUIDs using crypto.randomUUID(). Copy one or all at once.

Base64 Encode / Decode

Encode text and files to Base64, or decode Base64 strings back to text and downloadable files. Supports images, PDFs, and any file type. 100% client-side — your data never leaves your browser.

100% Private

All encoding and decoding happens in your browser using JavaScript's built-in APIs. Your text, files, and images are never uploaded to any server.

Files & Images

Drop any file — PNG, JPEG, PDF, SVG, Word doc — and get the Base64 data URL instantly. Perfect for embedding images in CSS, HTML, or JSON payloads.

Full Unicode

Handles emojis, CJK characters, Arabic, Hebrew, and any UTF-8 text correctly. Uses the modern TextEncoder/TextDecoder APIs — no data corruption.

How to Encode Text to Base64

  1. Select the Encode → Base64 tab.
  2. Choose Text if encoding a string, or File / Image if encoding a file.
  3. Type or paste your text in the left box — the Base64 output appears instantly on the right.
  4. For files, drop or click to upload. The Base64 data URL appears below, with an image preview for image files.
  5. Click Copy to copy the output to your clipboard.

How to Decode Base64

  1. Select the Decode ← Base64 tab.
  2. Paste your Base64 string into the left box. Whitespace is stripped automatically.
  3. The decoded text appears on the right. For data URLs (data:image/png;base64,…), the image is rendered inline.
  4. Use Download file to save a decoded binary file (image, PDF, etc.).

What is Base64?

Base64 is an encoding scheme defined in RFC 4648 that represents binary data using 64 printable ASCII characters: A–Z, a–z, 0–9, +, and /, with = used as padding. The name comes from the alphabet size: 2⁶ = 64.

Every 3 bytes of input become 4 Base64 characters. This means encoded output is roughly 33% larger than the original. Base64 is not compression — it trades size for text-safe representation.

Common Uses of Base64

Use caseExample
HTTP Basic AuthAuthorization: Basic dXNlcjpwYXNz
Embed images in HTML/CSSsrc="data:image/png;base64,iVBOR…"
JSON API payloads{ "file": "JVBERi0xLjQ…" }
Email attachments (MIME)Content-Transfer-Encoding: base64
JWT token partseyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1MSJ9…
CSS font embedding@font-face { src: url('data:font/woff2;base64,…') }
SVG inline in HTMLbackground-image: url('data:image/svg+xml;base64,…')

Base64 vs Base64URL

Standard Base64 uses + and / — characters that have special meaning in URLs. Base64URL (defined in RFC 4648 §5) replaces them with - and _and omits the = padding, making it safe to embed in URLs and cookie values without percent-encoding. JWTs use Base64URL for their header and payload sections.

Base64 for HTTP Basic Authentication

HTTP Basic Auth sends credentials as username:password encoded in Base64. To construct the header manually:

  1. Paste username:password (with the colon) into the Encode text box.
  2. Copy the Base64 output.
  3. Use it as: Authorization: Basic <output>

Remember: Basic Auth is only secure over HTTPS. Anyone who intercepts the header can trivially decode it — Base64 is not encryption.

Frequently Asked Questions

What is Base64 encoding?

Base64 converts binary data into 64 printable ASCII characters so it can be safely embedded in text-based formats like JSON, XML, HTML, HTTP headers, and email. It is not encryption — anyone can decode it without a key.

Does Base64 encrypt my data?

No. Base64 is encoding, not encryption. The encoded string can be decoded by anyone with a Base64 decoder. If you need to protect data, use a real encryption algorithm like AES-256.

Is my data uploaded to a server?

No. Everything happens in your browser using JavaScript's built-in btoa(), atob(), TextEncoder, TextDecoder, and FileReader APIs. Your files and text never leave your device.

How do I embed an image in HTML using Base64?

Upload your image in the File / Image tab, copy the data URL output, and use it as an <img> src: <img src="data:image/png;base64,iVBOR…">. The browser renders the image directly from the string — no separate file request needed.

Why does the encoded output end with = or ==?

Base64 encodes every 3 bytes into 4 characters. If the input length is not a multiple of 3, one or two = padding characters are appended to make the output length a multiple of 4. This is required by the specification.